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>
This commit is contained in:

committed by
David S. Miller

parent
6536993371
commit
419dba8a49
@@ -1109,7 +1109,9 @@ static int br_changelink(struct net_device *brdev, struct nlattr *tb[],
|
||||
if (data[IFLA_BR_STP_STATE]) {
|
||||
u32 stp_enabled = nla_get_u32(data[IFLA_BR_STP_STATE]);
|
||||
|
||||
br_stp_set_enabled(br, stp_enabled);
|
||||
err = br_stp_set_enabled(br, stp_enabled, extack);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (data[IFLA_BR_PRIORITY]) {
|
||||
|
Reference in New Issue
Block a user