forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/net/bridge/br_stp_if.c
....@@ -201,6 +201,9 @@
201201 {
202202 ASSERT_RTNL();
203203
204
+ if (!net_eq(dev_net(br->dev), &init_net))
205
+ NL_SET_ERR_MSG_MOD(extack, "STP does not work in non-root netns");
206
+
204207 if (br_mrp_enabled(br)) {
205208 NL_SET_ERR_MSG_MOD(extack,
206209 "STP can't be enabled if MRP is already enabled");