diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-09-11 13:14:44 -0400 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-09-17 15:15:16 -0400 |
commit | 4c18c425b2d228415b635e97a64737d7f27c5536 (patch) | |
tree | 796c4d86787a4fbccba7bdac890d3908504aace1 /net/batman-adv | |
parent | 1ef68ec462571955f2a667ddf1ffe279848709d7 (diff) |
batman-adv: set the TAG flag for the vid passed to BLA
When receiving or sending a packet a packet on a VLAN, the
vid has to be marked with the TAG flag in order to make any
component in batman-adv understand that the packet is coming
from a really tagged network.
This fix the Bridge Loop Avoidance behaviour which was not
able to send announces over VLAN interfaces.
Introduced by 0b1da1765fdb00ca5d53bc95c9abc70dfc9aae5b
("batman-adv: change VID semantic in the BLA code")
Signed-off-by: Antonio Quartulli <antonio@open-mesh.org>
Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/soft-interface.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index 4493913f0d5c..813db4e64602 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -168,6 +168,7 @@ static int batadv_interface_tx(struct sk_buff *skb, | |||
168 | case ETH_P_8021Q: | 168 | case ETH_P_8021Q: |
169 | vhdr = (struct vlan_ethhdr *)skb->data; | 169 | vhdr = (struct vlan_ethhdr *)skb->data; |
170 | vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK; | 170 | vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK; |
171 | vid |= BATADV_VLAN_HAS_TAG; | ||
171 | 172 | ||
172 | if (vhdr->h_vlan_encapsulated_proto != ethertype) | 173 | if (vhdr->h_vlan_encapsulated_proto != ethertype) |
173 | break; | 174 | break; |
@@ -331,6 +332,7 @@ void batadv_interface_rx(struct net_device *soft_iface, | |||
331 | case ETH_P_8021Q: | 332 | case ETH_P_8021Q: |
332 | vhdr = (struct vlan_ethhdr *)skb->data; | 333 | vhdr = (struct vlan_ethhdr *)skb->data; |
333 | vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK; | 334 | vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK; |
335 | vid |= BATADV_VLAN_HAS_TAG; | ||
334 | 336 | ||
335 | if (vhdr->h_vlan_encapsulated_proto != ethertype) | 337 | if (vhdr->h_vlan_encapsulated_proto != ethertype) |
336 | break; | 338 | break; |