Commit 12601a9b authored by Yonglong Liu's avatar Yonglong Liu Committed by Yang Yingliang
Browse files

net: hns: fix bug when two ports opened promisc mode both

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4OSUK


CVE: NA

----------------------------

When just adds eth1 to an OVS network, and eth1 and eth0 open
promisc mode both, the icmp6 neighbor solicitation packets from
OVS to eth1 will be sent back to the OVS network, cause
incorrect learning of arp.

The hns driver used a TCAM table to handle the promisc settings,
when setting TCAM table, the port mask of multicast should be
'0xf'(exact match), not 'port number'(fuzzy match). So when two
ports has the wrong port mask both, The icmp6 neighbor
solicitation packets will be incorrectly sent back to eth1.

This patch adds a mac_key to record the acturally port number,
use mask_key to record the 'exact match' port number to fix the
bug.

Fixes: a6c8c2c9a089 ("net: hns: fix non-promiscuous mode does not take effect problem")
Signed-off-by: default avatarYonglong Liu <liuyonglong@huawei.com>
Reviewed-by: default avatarKangfenglong <kangfenglong@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent cf7dfd77
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment