Skip to content

Commit

Permalink
net: bridge: fix error in br_multicast_add_port when CONFIG_NET_SWITC…
Browse files Browse the repository at this point in the history
…HDEV=n

commit 68f5c12 upstream.

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: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: ae1ea84 ("net: bridge: propagate error code and extack from br_mc_disabled_update")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
vladimiroltean authored and gregkh committed May 19, 2021
1 parent ef43e4d commit 7a7739b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7a7739b

Please sign in to comment.