batman-adv: 2013.3.0 updated stability fixes
[feed/routing.git] / batman-adv / patches / 0004-batman-adv-set-the-TAG-flag-for-the-vid-passed-to-BL.patch
1 From 59221041095c2b83205caab3dbabc94d7a6f32f9 Mon Sep 17 00:00:00 2001
2 From: Antonio Quartulli <antonio@open-mesh.com>
3 Date: Wed, 11 Sep 2013 19:14:44 +0200
4 Subject: [PATCH 4/4] batman-adv: set the TAG flag for the vid passed to BLA
5
6 When receiving or sending a packet a packet on a VLAN, the
7 vid has to be marked with the TAG flag in order to make any
8 component in batman-adv understand that the packet is coming
9 from a really tagged network.
10
11 This fix the Bridge Loop Avoidance behaviour which was not
12 able to send announces over VLAN interfaces.
13
14 Introduced by 0b1da1765fdb00ca5d53bc95c9abc70dfc9aae5b
15 ("batman-adv: change VID semantic in the BLA code")
16
17 Signed-off-by: Antonio Quartulli <antonio@open-mesh.org>
18 Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
19 Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
20 ---
21 soft-interface.c | 2 ++
22 1 file changed, 2 insertions(+)
23
24 diff --git a/soft-interface.c b/soft-interface.c
25 index 0f04e1c..33b6144 100644
26 --- a/soft-interface.c
27 +++ b/soft-interface.c
28 @@ -168,6 +168,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
29 case ETH_P_8021Q:
30 vhdr = (struct vlan_ethhdr *)skb->data;
31 vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
32 + vid |= BATADV_VLAN_HAS_TAG;
33
34 if (vhdr->h_vlan_encapsulated_proto != ethertype)
35 break;
36 @@ -329,6 +330,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
37 case ETH_P_8021Q:
38 vhdr = (struct vlan_ethhdr *)skb->data;
39 vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
40 + vid |= BATADV_VLAN_HAS_TAG;
41
42 if (vhdr->h_vlan_encapsulated_proto != ethertype)
43 break;
44 --
45 1.8.4.rc3
46