Searched hist:f7f8ed5695ef441495cfab5287951927d9d5f12e (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/net/batman-adv/ |
H A D | gateway_client.c | diff f7f8ed5695ef441495cfab5287951927d9d5f12e Sun May 12 14:51:15 CDT 2013 Antonio Quartulli <ordex@autistici.org> batman-adv: h_vlan_encapsulated_proto access refactoring
In case of a VLAN tagged frame the ethhdr pointer is moved forward by 4 bytes so that the offset of h_proto in struct ethhdr matches the real h_vlan_encapsulated_proto address in the skb. While this trickery is correct it makes the code harder to understand and may lead to bugs in case of re-use of ethhdr for other purposes.
This patch introduces a proto variable to make things cleaner and easier to understand.
Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
|