On Sunday, October 14, 2012 20:46:57 Simon Wunderlich wrote:
It is possible that the mac_len is not properly exported because of strange device configuration (this behaviour has been observed when using batman-adv on top of a vlan interface). Therefore it is needed to explicitly recompute it at the very beginning of the rx path.
This is done by appending the recompute function to the skb_share_mac() function, hence the "dirty hack" in the subject. We expect this problem to be fixed in linux 3.8 and above.
Reported-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Simon Wunderlich siwu@hrz.tu-chemnitz.de
this is a rewrite of Antonios patch "batman-adv: recompute mac_len at the beginning of the rx path". It is intended to fix the issue for out-of-kernel releases, without hurting the in-kernel code too much. Obviously, this patch won't go upstream into the kernel.
This version includes Svens "more sane" version, and also has implements skb_reset_mac_len() for kernels prior to 3.0.
compat.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
Applied in revision a6ad857.
Thanks, Marek