diff options
author | Horatiu Vultur <horatiu.vultur@microchip.com> | 2020-04-26 16:22:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-27 21:40:25 +0300 |
commit | 419dba8a49d7cc355e5b495d20dea8217369ed63 (patch) | |
tree | 4e63a0779364f24e8907eade08443338123a2f78 /net/bridge/br_sysfs_br.c | |
parent | 6536993371fab3de4e8379649b60e94d03e6ff37 (diff) | |
download | linux-419dba8a49d7cc355e5b495d20dea8217369ed63.tar.xz |
net: bridge: Add checks for enabling the STP.
It is not possible to have the MRP and STP running at the same time on the
bridge, therefore add check when enabling the STP to check if MRP is already
enabled. In that case return error.
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.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 | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 9ab0f00b1081..7db06e3f642a 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c @@ -126,9 +126,7 @@ static ssize_t stp_state_show(struct device *d, static int set_stp_state(struct net_bridge *br, unsigned long val) { - br_stp_set_enabled(br, val); - - return 0; + return br_stp_set_enabled(br, val, NULL); } static ssize_t stp_state_store(struct device *d, |