]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: rtl8366: Check validity of passed VLANs
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 1 Sep 2020 22:09:34 +0000 (00:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Sep 2020 21:13:35 +0000 (14:13 -0700)
commit6641a2c42b0a307b7638d10e5d4b90debc61389d
tree4c1460cff0a78e2bf71f19df4f54fecb12214cb8
parentc6f4c2b027c471838f44de03ef8c4100e4986852
net: dsa: rtl8366: Check validity of passed VLANs

The rtl8366_set_vlan() and rtl8366_set_pvid() get invalid
VLANs tossed at it, especially VLAN0, something the hardware
and driver cannot handle. Check validity and bail out like
we do in the other callbacks.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/rtl8366.c