diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2021-04-14 21:22:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-14 23:32:05 +0200 |
commit | ae1ea84b33dab45c7b6c1754231ebda5959b504c (patch) | |
tree | d367f095633f6aec27ad80288086aebbe385b294 /net/bridge/br_netlink.c | |
parent | Merge tag 'mlx5-updates-2021-04-13' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
download | linux-ae1ea84b33dab45c7b6c1754231ebda5959b504c.tar.xz linux-ae1ea84b33dab45c7b6c1754231ebda5959b504c.zip |
net: bridge: propagate error code and extack from br_mc_disabled_update
Some Ethernet switches might only be able to support disabling multicast
snooping globally, which is an issue for example when several bridges
span the same physical device and request contradictory settings.
Propagate the return value of br_mc_disabled_update() such that this
limitation is transmitted correctly to user-space.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_netlink.c')
-rw-r--r-- | net/bridge/br_netlink.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index f2b1343f8332..0456593aceec 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -1293,7 +1293,9 @@ static int br_changelink(struct net_device *brdev, struct nlattr *tb[], if (data[IFLA_BR_MCAST_SNOOPING]) { u8 mcast_snooping = nla_get_u8(data[IFLA_BR_MCAST_SNOOPING]); - br_multicast_toggle(br, mcast_snooping); + err = br_multicast_toggle(br, mcast_snooping, extack); + if (err) + return err; } if (data[IFLA_BR_MCAST_QUERY_USE_IFADDR]) { |