]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: check vlan id before using it
authorliaoguojia <liaoguojia@huawei.com>
Wed, 15 Sep 2021 13:52:10 +0000 (21:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Sep 2021 12:28:39 +0000 (13:28 +0100)
commit8cb355eeca15445b524897b9cd75d70f2af1a447
treeabd04de90b529174dbc89365691fd12466814d3e
parentb5d16b26a57fad837b6f1cea5ce3efe385773032
net: hns3: check vlan id before using it

The input parameters may not be reliable, so check the vlan id before
using it, otherwise may set wrong vlan id into hardware.

Fixes: 87d9446f883d ("net: hns3: Fix for packet loss due wrong filter config in VLAN tbls")
Signed-off-by: liaoguojia <liaoguojia@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c