]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: allow 8021q uppers while the bridge has vlan_filtering=0
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 21 Sep 2020 00:10:28 +0000 (03:10 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Sep 2020 02:01:34 +0000 (19:01 -0700)
commitc9ef873d4cf8836203f3c7f9e696836b97b0691c
treef362224553c614ba86a55df3f0ae349fc569390b
parent03dee5b1b6e0bed545efad384b433200dbac0a93
net: dsa: allow 8021q uppers while the bridge has vlan_filtering=0

When the bridge has VLAN awareness disabled there isn't any duplication
of functionality, since the bridge does not process VLAN. Don't deny
adding 8021q uppers to DSA switch ports in that case. The switch is
supposed to simply pass traffic leaving the VLAN tag as-is, and the
stack will happily strip the VLAN tag for all 8021q uppers that exist.

We need to ensure that there are no 8021q uppers when the user attempts
to enable bridge vlan_filtering.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/port.c
net/dsa/slave.c