Skip to contentSkip to conversation

batman-adv: fix vlan header access

PATCH Applied Antonio Quartulli 2 participants 2 messages Dec 23, 2013 – Dec 28, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 batman-adv: fix vlan header access

When batadv_get_vid() is invoked in interface_rx() the batman-adv header has already been removed, therefore the header_len argument has to be 0.

Introduced by 580d7919f19e4f73ccd79e82a532af2bdc638042 ("batman-adv: add the VLAN ID attribute to the TT entry")

---
 soft-interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
soft-interface.c +1 -1
index 74f4630..2a09294 100644
@@ -346,7 +346,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
 	skb_pull_rcsum(skb, hdr_size);
 	skb_reset_mac_header(skb);
 
-	vid = batadv_get_vid(skb, hdr_size);
+	vid = batadv_get_vid(skb, 0);
 	ethhdr = eth_hdr(skb);
 
 	switch (ntohs(ethhdr->h_proto)) {
Signature · 1 line
1.8.5.2
#1 lore raw
Quoted 11 lines · On Monday 23 December 2013 21:43:39 Antonio Quartulli wrote:

When batadv_get_vid() is invoked in interface_rx() the batman-adv header has already been removed, therefore the header_len argument has to be 0.

Introduced by 580d7919f19e4f73ccd79e82a532af2bdc638042 ("batman-adv: add the VLAN ID attribute to the TT entry")

---
 soft-interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied in revision c03be25.

Thanks,
Marek