net: bridge: Add checks for enabling the STP.
[linux-2.6-microblaze.git] / net / bridge / br_netlink.c
index 1a5e681..a774e19 100644 (file)
@@ -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]) {