]> 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)
commitb85d8a2631229dd20b1c0acd2f5e349c4ba21a76
treef362224553c614ba86a55df3f0ae349fc569390b
parentf32c93d7f2409d4b98a03a0619cc93d66aaacbc9
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