diff options
author | Govindarajulu Varadarajan <_govind@gmx.com> | 2016-05-09 10:06:29 +0530 |
---|---|---|
committer | Jiri Pirko <jiri@mellanox.com> | 2016-05-20 10:53:08 +0200 |
commit | 08f37b238cb0b796986c253e563b6b2c12836176 (patch) | |
tree | 054b8a960312491e235c814f2c88151ed18c3732 | |
parent | 2df53681c954b555cb33a2cb9aacb90afb1e272e (diff) | |
download | libteam-08f37b238cb0b796986c253e563b6b2c12836176.tar.gz |
teamd: handle vlan 0 packets
arp_novlan_rpl_flt[] checks if skb->vlan_tci is present and returns 0 if it is
present. This breaks with some of the hardwares/switches which strips of vlan
tag but retains 802.1p priority bits (vlan_id in header will be 0).
Packets with vlan_id 0 should be treated as non-vlan tagged packet.
teamd should process arp reply of non-vlan packets and packets with vlan_id 0.
This patch programs filter such that it checks if vlan_id is 0 if vlan tag is
present.
Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
-rw-r--r-- | teamd/teamd_lw_arp_ping.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/teamd/teamd_lw_arp_ping.c b/teamd/teamd_lw_arp_ping.c index 75fedb6..01cd6e1 100644 --- a/teamd/teamd_lw_arp_ping.c +++ b/teamd/teamd_lw_arp_ping.c @@ -73,6 +73,8 @@ static struct sock_filter arp_novlan_rpl_flt[] = { BPF_STMT(BPF_LD + BPF_B + BPF_ABS, SKF_AD_OFF + SKF_AD_PROTOCOL), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETH_P_ARP, 0, 6), BPF_STMT(BPF_LD + BPF_B + BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG_PRESENT), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 2, 0), + BPF_STMT(BPF_LD + BPF_B + BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 0, 4), BPF_STMT(BPF_LD + BPF_H + BPF_ABS, OFFSET_ARP_OP_CODE), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 1, 0), |