diff options
author | Roopa Prabhu <roopa@cumulusnetworks.com> | 2015-01-30 01:40:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-02 02:16:33 -0500 |
commit | add511b38266aa10c1079f9248854e6a415c4dc2 (patch) | |
tree | f2668d24dc561031d29c0af17c710ecc082eb94b /net/core | |
parent | aafb3e98b27977148c8c86499684f8f5c3decfbb (diff) |
bridge: add flags argument to ndo_bridge_setlink and ndo_bridge_dellink
bridge flags are needed inside ndo_bridge_setlink/dellink handlers to
avoid another call to parse IFLA_AF_SPEC inside these handlers
This is used later in this series
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index fedd7ab4085a..673cb4c6f391 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -2991,7 +2991,7 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
2991 | goto out; | 2991 | goto out; |
2992 | } | 2992 | } |
2993 | 2993 | ||
2994 | err = br_dev->netdev_ops->ndo_bridge_setlink(dev, nlh); | 2994 | err = br_dev->netdev_ops->ndo_bridge_setlink(dev, nlh, flags); |
2995 | if (err) | 2995 | if (err) |
2996 | goto out; | 2996 | goto out; |
2997 | 2997 | ||
@@ -3002,7 +3002,8 @@ static int rtnl_bridge_setlink(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
3002 | if (!dev->netdev_ops->ndo_bridge_setlink) | 3002 | if (!dev->netdev_ops->ndo_bridge_setlink) |
3003 | err = -EOPNOTSUPP; | 3003 | err = -EOPNOTSUPP; |
3004 | else | 3004 | else |
3005 | err = dev->netdev_ops->ndo_bridge_setlink(dev, nlh); | 3005 | err = dev->netdev_ops->ndo_bridge_setlink(dev, nlh, |
3006 | flags); | ||
3006 | if (!err) { | 3007 | if (!err) { |
3007 | flags &= ~BRIDGE_FLAGS_SELF; | 3008 | flags &= ~BRIDGE_FLAGS_SELF; |
3008 | 3009 | ||
@@ -3064,7 +3065,7 @@ static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
3064 | goto out; | 3065 | goto out; |
3065 | } | 3066 | } |
3066 | 3067 | ||
3067 | err = br_dev->netdev_ops->ndo_bridge_dellink(dev, nlh); | 3068 | err = br_dev->netdev_ops->ndo_bridge_dellink(dev, nlh, flags); |
3068 | if (err) | 3069 | if (err) |
3069 | goto out; | 3070 | goto out; |
3070 | 3071 | ||
@@ -3075,7 +3076,8 @@ static int rtnl_bridge_dellink(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
3075 | if (!dev->netdev_ops->ndo_bridge_dellink) | 3076 | if (!dev->netdev_ops->ndo_bridge_dellink) |
3076 | err = -EOPNOTSUPP; | 3077 | err = -EOPNOTSUPP; |
3077 | else | 3078 | else |
3078 | err = dev->netdev_ops->ndo_bridge_dellink(dev, nlh); | 3079 | err = dev->netdev_ops->ndo_bridge_dellink(dev, nlh, |
3080 | flags); | ||
3079 | 3081 | ||
3080 | if (!err) { | 3082 | if (!err) { |
3081 | flags &= ~BRIDGE_FLAGS_SELF; | 3083 | flags &= ~BRIDGE_FLAGS_SELF; |