OSDN Git Service

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)
commitadb256eb1769dec74b809690f418e8e46bee62a7
treef362224553c614ba86a55df3f0ae349fc569390b
parent707ec383b369b8da9f009c3ab2236b335ec10788
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