Commit 68f5c12a authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: bridge: fix error in br_multicast_add_port when CONFIG_NET_SWITCHDEV=n

When CONFIG_NET_SWITCHDEV is disabled, the shim for switchdev_port_attr_set
inside br_mc_disabled_update returns -EOPNOTSUPP. This is not caught,
and propagated to the caller of br_multicast_add_port, preventing ports
from joining the bridge.
Reported-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Fixes: ae1ea84b ("net: bridge: propagate error code and extack from br_mc_disabled_update")
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Tested-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Acked-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 36e69da8
......@@ -1625,7 +1625,7 @@ int br_multicast_add_port(struct net_bridge_port *port)
br_opt_get(port->br,
BROPT_MULTICAST_ENABLED),
NULL);
if (err)
if (err && err != -EOPNOTSUPP)
return err;
port->mcast_stats = netdev_alloc_pcpu_stats(struct bridge_mcast_stats);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment