浏览代码

Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge

Included change:
- fix the Bridge Loop Avoidance component by marking the variables containing
  the VLAN ID with the HAS_TAG flag when needed.
David S. Miller 12 年之前
父节点
当前提交
4bdc944729
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      net/batman-adv/soft-interface.c

+ 2 - 0
net/batman-adv/soft-interface.c

@@ -168,6 +168,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
 	case ETH_P_8021Q:
 	case ETH_P_8021Q:
 		vhdr = (struct vlan_ethhdr *)skb->data;
 		vhdr = (struct vlan_ethhdr *)skb->data;
 		vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
 		vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
+		vid |= BATADV_VLAN_HAS_TAG;
 
 
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
 			break;
 			break;
@@ -331,6 +332,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
 	case ETH_P_8021Q:
 	case ETH_P_8021Q:
 		vhdr = (struct vlan_ethhdr *)skb->data;
 		vhdr = (struct vlan_ethhdr *)skb->data;
 		vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
 		vid = ntohs(vhdr->h_vlan_TCI) & VLAN_VID_MASK;
+		vid |= BATADV_VLAN_HAS_TAG;
 
 
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
 			break;
 			break;