Skip to content

Commit

Permalink
batman-adv: use VLAN_ETH_HLEN instead of sizeof(struct vlan_eth_hdr)
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
  • Loading branch information
Antonio Quartulli authored and Antonio Quartulli committed Oct 12, 2013
1 parent f7f8ed5 commit 2c59866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/batman-adv/bridge_loop_avoidance.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2c59866

Please sign in to comment.