Skip to contentSkip to conversation

batman-adv: set the TAG flag for the vid passed to BLA

PATCH Applied Antonio Quartulli 3 participants 3 messages Sep 11, 2013 – Sep 17, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 batman-adv: set the TAG flag for the vid passed to BLA

From: Antonio Quartulli <[email protected]>

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")

---
 soft-interface.c | 2 ++
 1 file changed, 2 insertions(+)
soft-interface.c +2 -0
index 0f04e1c..33b6144 100644
@@ -168,6 +168,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
 	case ETH_P_8021Q:
 		vhdr = (struct vlan_ethhdr *)skb->data;
 		vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
+		vid |= BATADV_VLAN_HAS_TAG;
 
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
 			break;
@@ -329,6 +330,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
 	case ETH_P_8021Q:
 		vhdr = (struct vlan_ethhdr *)skb->data;
 		vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
+		vid |= BATADV_VLAN_HAS_TAG;
 
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
 			break;
Signature · 1 line
1.8.1.5
Acked-by on v1 1/1
#1 lore raw

Looks good - thanks for fixing that.

Quoted 41 lines · Antonio Quartulli

From: Antonio Quartulli <[email protected]>

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")

---
 soft-interface.c | 2 ++
 1 file changed, 2 insertions(+)
soft-interface.c +2 -0
index 0f04e1c..33b6144 100644
@@ -168,6 +168,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
 	case ETH_P_8021Q:
 		vhdr = (struct vlan_ethhdr *)skb->data;
 		vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
+		vid |= BATADV_VLAN_HAS_TAG;
 
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
 			break;
@@ -329,6 +330,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
 	case ETH_P_8021Q:
 		vhdr = (struct vlan_ethhdr *)skb->data;
 		vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
+		vid |= BATADV_VLAN_HAS_TAG;
 
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
 			break;
Signature · 1 line
1.8.1.5
#2 lore raw
In reply to Antonio Quartulli
Quoted 10 lines · On Wednesday 11 September 2013 19:14:44 Antonio Quartulli wrote:

From: Antonio Quartulli <[email protected]>

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.

Quoted 7 lines

Introduced by 0b1da1765fdb00ca5d53bc95c9abc70dfc9aae5b ("batman-adv: change VID semantic in the BLA code")

---
 soft-interface.c | 2 ++
 1 file changed, 2 insertions(+)

Applied in revision 5922104.

Thanks,
Marek