aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/rtnetlink.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 0e26b9f66cad..47b39f3e867c 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2918,7 +2918,7 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
2918 struct net_device *dev; 2918 struct net_device *dev;
2919 struct nlattr *br_spec, *attr = NULL; 2919 struct nlattr *br_spec, *attr = NULL;
2920 int rem, err = -EOPNOTSUPP; 2920 int rem, err = -EOPNOTSUPP;
2921 u16 oflags, flags = 0; 2921 u16 flags = 0;
2922 bool have_flags = false; 2922 bool have_flags = false;
2923 2923
2924 if (nlmsg_len(nlh) < sizeof(*ifm)) 2924 if (nlmsg_len(nlh) < sizeof(*ifm))
@@ -2948,8 +2948,6 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh)
2948 } 2948 }
2949 } 2949 }
2950 2950
2951 oflags = flags;
2952
2953 if (!flags || (flags & BRIDGE_FLAGS_MASTER)) { 2951 if (!flags || (flags & BRIDGE_FLAGS_MASTER)) {
2954 struct net_device *br_dev = netdev_master_upper_dev_get(dev); 2952 struct net_device *br_dev = netdev_master_upper_dev_get(dev);
2955 2953
@@ -2993,7 +2991,7 @@ static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
2993 struct net_device *dev; 2991 struct net_device *dev;
2994 struct nlattr *br_spec, *attr = NULL; 2992 struct nlattr *br_spec, *attr = NULL;
2995 int rem, err = -EOPNOTSUPP; 2993 int rem, err = -EOPNOTSUPP;
2996 u16 oflags, flags = 0; 2994 u16 flags = 0;
2997 bool have_flags = false; 2995 bool have_flags = false;
2998 2996
2999 if (nlmsg_len(nlh) < sizeof(*ifm)) 2997 if (nlmsg_len(nlh) < sizeof(*ifm))
@@ -3023,8 +3021,6 @@ static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
3023 } 3021 }
3024 } 3022 }
3025 3023
3026 oflags = flags;
3027
3028 if (!flags || (flags & BRIDGE_FLAGS_MASTER)) { 3024 if (!flags || (flags & BRIDGE_FLAGS_MASTER)) {
3029 struct net_device *br_dev = netdev_master_upper_dev_get(dev); 3025 struct net_device *br_dev = netdev_master_upper_dev_get(dev);
3030 3026