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>
此提交包含在:
@@ -36,6 +36,12 @@ void br_set_state(struct net_bridge_port *p, unsigned int state)
|
||||
};
|
||||
int err;
|
||||
|
||||
/* Don't change the state of the ports if they are driven by a different
|
||||
* protocol.
|
||||
*/
|
||||
if (p->flags & BR_MRP_AWARE)
|
||||
return;
|
||||
|
||||
p->state = state;
|
||||
err = switchdev_port_attr_set(p->dev, &attr);
|
||||
if (err && err != -EOPNOTSUPP)
|
||||
|
新增問題並參考
封鎖使用者