Skip to content

Commit 2c59866

Browse files
Antonio Quartulliordex
authored andcommitted
batman-adv: use VLAN_ETH_HLEN instead of sizeof(struct vlan_eth_hdr)
Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Marek Lindner <[email protected]>
1 parent f7f8ed5 commit 2c59866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/batman-adv/bridge_loop_avoidance.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ int batadv_bla_is_backbone_gw(struct sk_buff *skb,
13801380
ethhdr = (struct ethhdr *)(((uint8_t *)skb->data) + hdr_size);
13811381

13821382
if (ntohs(ethhdr->h_proto) == ETH_P_8021Q) {
1383-
if (!pskb_may_pull(skb, hdr_size + sizeof(struct vlan_ethhdr)))
1383+
if (!pskb_may_pull(skb, hdr_size + VLAN_ETH_HLEN))
13841384
return 0;
13851385

13861386
vhdr = (struct vlan_ethhdr *)(skb->data + hdr_size);

0 commit comments

Comments
 (0)