diff options
author | Tobias Waldekranz <tobias@waldekranz.com> | 2021-01-13 09:42:52 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-15 02:11:55 +0100 |
commit | 5696c8aedfccbc5ec644d00fc91f71595b495660 (patch) | |
tree | 7baa89ba10c629c9ab3ec006faf3e75539f2fafd /net/dsa | |
parent | net: bonding: Notify ports about their initial state (diff) | |
download | linux-5696c8aedfccbc5ec644d00fc91f71595b495660.tar.xz linux-5696c8aedfccbc5ec644d00fc91f71595b495660.zip |
net: dsa: Don't offload port attributes on standalone ports
In a situation where a standalone port is indirectly attached to a
bridge (e.g. via a LAG) which is not offloaded, do not offload any
port attributes either. The port should behave as a standard NIC.
Previously, on mv88e6xxx, this meant that in the following setup:
br0
/
team0
/ \
swp0 swp1
If vlan filtering was enabled on br0, swp0's and swp1's QMode was set
to "secure". This caused all untagged packets to be dropped, as their
default VID (0) was not loaded into the VTU.
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/slave.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 5a1769602e65..e53c8ca6eb66 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -273,6 +273,9 @@ static int dsa_slave_port_attr_set(struct net_device *dev, struct dsa_port *dp = dsa_slave_to_port(dev); int ret; + if (attr->orig_dev != dev) + return -EOPNOTSUPP; + switch (attr->id) { case SWITCHDEV_ATTR_ID_PORT_STP_STATE: ret = dsa_port_set_state(dp, attr->u.stp_state); |