]> 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)
commit3d3b066289d094137d03d59533164acd5dce59c5
tree4c1460cff0a78e2bf71f19df4f54fecb12214cb8
parent01c5cd482406346d8c706029498e11af869ae7fe
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