Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit 816f978afb9e157e6d8b24dd809dd42c044eb4c6 Merge: 68e981a3 35482922 Author: Sven Eckelmann sven@narfation.org Date: Thu Feb 14 11:02:04 2019 +0100
Merge branch 'maint'
816f978afb9e157e6d8b24dd809dd42c044eb4c6 net/batman-adv/soft-interface.c | 2 ++ 1 file changed, 2 insertions(+)
diff --cc net/batman-adv/soft-interface.c index 5cb4a2f5,450213b7..2e367230 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@@ -226,15 -225,14 +226,17 @@@ static netdev_tx_t batadv_interface_tx( skb_reset_mac_header(skb); ethhdr = eth_hdr(skb);
- switch (ntohs(ethhdr->h_proto)) { + proto = ethhdr->h_proto; + + switch (ntohs(proto)) { case ETH_P_8021Q: + if (!pskb_may_pull(skb, sizeof(*vhdr))) + goto dropped; vhdr = vlan_eth_hdr(skb); + proto = vhdr->h_vlan_encapsulated_proto;
/* drop batman-in-batman packets to prevent loops */ - if (vhdr->h_vlan_encapsulated_proto != htons(ETH_P_BATMAN)) { + if (proto != htons(ETH_P_BATMAN)) { network_offset += VLAN_HLEN; break; }