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:Yonglong Liu <liuyonglong@huawei.com> Reviewed-by:
Kangfenglong <kangfenglong@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment