net: bridge: fix error in br_multicast_add_port when CONFIG_NET_SWITCHDEV=n
Subsystems (3)
PATCH 1/1 net: bridge: fix error in br_multicast_add_port when CONFIG_NET_SWITCHDEV=n
From: Vladimir Oltean <[email protected]>
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.
--- net/bridge/br_multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/bridge/br_multicast.c +1 -1
@@ -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);
Signature · 1 line
2.25.1
Quoted 10 lines · Vladimir Oltean
From: Vladimir Oltean <[email protected]>
When
CONFIG_NET_SWITCHDEVis disabled, the shim forswitchdev_port_attr_setinsidebr_mc_disabled_updatereturns-EOPNOTSUPP. This is not caught, and propagated to the caller ofbr_multicast_add_port, preventing ports from joining the bridge.Reported-by Christian Borntraeger <[email protected]>Fixes ae1ea84b33da ("net: bridge: propagate error code and extack from br_mc_disabled_update")Signed-off-by Vladimir Oltean <[email protected]>
That was quick, thanks!
Signature · 1 line
Florian
Quoted 10 lines · Vladimir Oltean
From: Vladimir Oltean <[email protected]>
When
CONFIG_NET_SWITCHDEVis disabled, the shim forswitchdev_port_attr_setinsidebr_mc_disabled_updatereturns-EOPNOTSUPP. This is not caught, and propagated to the caller ofbr_multicast_add_port, preventing ports from joining the bridge.Reported-by Christian Borntraeger <[email protected]>Fixes ae1ea84b33da ("net: bridge: propagate error code and extack from br_mc_disabled_update")Signed-off-by Vladimir Oltean <[email protected]>
yes this works now:
Quoted 18 lines
--- net/bridge/br_multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/bridge/br_multicast.c +1
-1@@ -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);
Quoted 20 lines · Vladimir Oltean
From: Vladimir Oltean <[email protected]>
When
CONFIG_NET_SWITCHDEVis disabled, the shim forswitchdev_port_attr_setinsidebr_mc_disabled_updatereturns-EOPNOTSUPP. This is not caught, and propagated to the caller ofbr_multicast_add_port, preventing ports from joining the bridge.Reported-by Christian Borntraeger <[email protected]>Fixes ae1ea84b33da ("net: bridge: propagate error code and extack from br_mc_disabled_update")Signed-off-by Vladimir Oltean <[email protected]>--- net/bridge/br_multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/bridge/br_multicast.c +0
-0
net/bridge/br_multicast.c int br_multicast_add_port(struct net_bridge_port *port) · line 1631
Quoted 8 lines
net/bridge/br_multicast.c +1
-1@@ -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);
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 8 lines · On Wed, 21 Apr 2021 21:44:20 +0300 you wrote:
From: Vladimir Oltean <[email protected]>
When
CONFIG_NET_SWITCHDEVis disabled, the shim forswitchdev_port_attr_setinsidebr_mc_disabled_updatereturns-EOPNOTSUPP. This is not caught, and propagated to the caller ofbr_multicast_add_port, preventing ports from joining the bridge.[...]
Here is the summary with links:
- [net-next] net: bridge: fix error in br_multicast_add_port when CONFIG_NET_SWITCHDEV=n
https://git.kernel.org/netdev/net-next/c/68f5c12abbc9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html