From: Antonio Quartulli Date: Sun, 12 May 2013 19:57:09 +0000 (+0200) Subject: batman-adv: use VLAN_ETH_HLEN instead of sizeof(struct vlan_eth_hdr) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2c598663e84c8c8edbbac568e9e94e1fac410c3c;p=openwrt%2Fstaging%2Fblogic.git batman-adv: use VLAN_ETH_HLEN instead of sizeof(struct vlan_eth_hdr) Signed-off-by: Antonio Quartulli Signed-off-by: Marek Lindner --- diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 264de88db320..70da18ab41c3 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c @@ -1380,7 +1380,7 @@ int batadv_bla_is_backbone_gw(struct sk_buff *skb, ethhdr = (struct ethhdr *)(((uint8_t *)skb->data) + hdr_size); if (ntohs(ethhdr->h_proto) == ETH_P_8021Q) { - if (!pskb_may_pull(skb, hdr_size + sizeof(struct vlan_ethhdr))) + if (!pskb_may_pull(skb, hdr_size + VLAN_ETH_HLEN)) return 0; vhdr = (struct vlan_ethhdr *)(skb->data + hdr_size);