Commit 4c18c425b2d228415b635e97a64737d7f27c5536
Committed by
Antonio Quartulli
1 parent
1ef68ec462
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>
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
net/batman-adv/soft-interface.c
... | ... | @@ -168,6 +168,7 @@ |
168 | 168 | case ETH_P_8021Q: |
169 | 169 | vhdr = (struct vlan_ethhdr *)skb->data; |
170 | 170 | vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK; |
171 | + vid |= BATADV_VLAN_HAS_TAG; | |
171 | 172 | |
172 | 173 | if (vhdr->h_vlan_encapsulated_proto != ethertype) |
173 | 174 | break; |
... | ... | @@ -331,6 +332,7 @@ |
331 | 332 | case ETH_P_8021Q: |
332 | 333 | vhdr = (struct vlan_ethhdr *)skb->data; |
333 | 334 | vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK; |
335 | + vid |= BATADV_VLAN_HAS_TAG; | |
334 | 336 | |
335 | 337 | if (vhdr->h_vlan_encapsulated_proto != ethertype) |
336 | 338 | break; |