diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2021-04-14 22:22:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-15 00:32:05 +0300 |
commit | ae1ea84b33dab45c7b6c1754231ebda5959b504c (patch) | |
tree | d367f095633f6aec27ad80288086aebbe385b294 /net/bridge/br_sysfs_br.c | |
parent | 4a65912fde5b2a0bde4df90426bb8c51a48f1230 (diff) | |
download | linux-ae1ea84b33dab45c7b6c1754231ebda5959b504c.tar.xz |
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_sysfs_br.c')
-rw-r--r-- | net/bridge/br_sysfs_br.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 072e29840082..381467b691d5 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c @@ -409,17 +409,11 @@ static ssize_t multicast_snooping_show(struct device *d, return sprintf(buf, "%d\n", br_opt_get(br, BROPT_MULTICAST_ENABLED)); } -static int toggle_multicast(struct net_bridge *br, unsigned long val, - struct netlink_ext_ack *extack) -{ - return br_multicast_toggle(br, val); -} - static ssize_t multicast_snooping_store(struct device *d, struct device_attribute *attr, const char *buf, size_t len) { - return store_bridge_parm(d, buf, len, toggle_multicast); + return store_bridge_parm(d, buf, len, br_multicast_toggle); } static DEVICE_ATTR_RW(multicast_snooping); |