diff options
author | David S. Miller <davem@davemloft.net> | 2015-08-17 14:31:42 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-17 14:31:42 -0700 |
commit | c1f066d4ee0bde4bb0ff4ac295218b631729e0de (patch) | |
tree | e33985e92b07c879a2759f20518887ad8e5af12b /net/batman-adv/soft-interface.c | |
parent | 2bd736fa0d8a1da90e6ccaa6a79e56a8d2ae60c4 (diff) | |
parent | 53cf037bf846417fd92dc92ddf97267f69b110f4 (diff) | |
download | talos-obmc-linux-c1f066d4ee0bde4bb0ff4ac295218b631729e0de.tar.gz talos-obmc-linux-c1f066d4ee0bde4bb0ff4ac295218b631729e0de.zip |
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
Antonio Quartulli says:
====================
Included changes:
- avoid integer overflow in GW selection routine
- prevent race condition by making capability bit changes atomic (use
clear/set/test_bit)
- fix synchronization issue in mcast tvlv handler
- fix crash on double list removal of TT Request objects
- fix leak by puring packets enqueued for sending upon iface removal
- ensure network header pointer is set in skb
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index a2fc843c2243..51cda3a7c51d 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c @@ -202,6 +202,7 @@ static int batadv_interface_tx(struct sk_buff *skb, int gw_mode; enum batadv_forw_mode forw_mode; struct batadv_orig_node *mcast_single_orig = NULL; + int network_offset = ETH_HLEN; if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE) goto dropped; @@ -214,14 +215,18 @@ static int batadv_interface_tx(struct sk_buff *skb, case ETH_P_8021Q: vhdr = vlan_eth_hdr(skb); - if (vhdr->h_vlan_encapsulated_proto != ethertype) + if (vhdr->h_vlan_encapsulated_proto != ethertype) { + network_offset += VLAN_HLEN; break; + } /* fall through */ case ETH_P_BATMAN: goto dropped; } + skb_set_network_header(skb, network_offset); + if (batadv_bla_tx(bat_priv, skb, vid)) goto dropped; |