mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
batman-adv: use VLAN_ETH_HLEN instead of sizeof(struct vlan_eth_hdr)
Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
This commit is contained in:
parent
f7f8ed5695
commit
2c598663e8
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue