diff options
Diffstat (limited to 'net/batman-adv/soft-interface.c')
| -rw-r--r-- | net/batman-adv/soft-interface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 5db5a0a4c959..ffc83bebfe40 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
| @@ -221,10 +221,14 @@ static netdev_tx_t batadv_interface_tx(struct sk_buff *skb, | |||
| 221 | 221 | ||
| 222 | netif_trans_update(soft_iface); | 222 | netif_trans_update(soft_iface); |
| 223 | vid = batadv_get_vid(skb, 0); | 223 | vid = batadv_get_vid(skb, 0); |
| 224 | |||
| 225 | skb_reset_mac_header(skb); | ||
| 224 | ethhdr = eth_hdr(skb); | 226 | ethhdr = eth_hdr(skb); |
| 225 | 227 | ||
| 226 | switch (ntohs(ethhdr->h_proto)) { | 228 | switch (ntohs(ethhdr->h_proto)) { |
| 227 | case ETH_P_8021Q: | 229 | case ETH_P_8021Q: |
| 230 | if (!pskb_may_pull(skb, sizeof(*vhdr))) | ||
| 231 | goto dropped; | ||
| 228 | vhdr = vlan_eth_hdr(skb); | 232 | vhdr = vlan_eth_hdr(skb); |
| 229 | 233 | ||
| 230 | /* drop batman-in-batman packets to prevent loops */ | 234 | /* drop batman-in-batman packets to prevent loops */ |
