diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2013-01-31 11:30:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 13:12:16 -0500 |
commit | c5c351088ae76b46ae08dec1bb7f621e0721c78b (patch) | |
tree | 00fb5fb0194caa7ea89beb53621de4fe65adb68f /net/core | |
parent | 4f463855c7d5a0ed0faa62497f3006336e74ee16 (diff) |
netns: fdb: allow unprivileged users to add/del fdb entries
Right now,only ixgdb,macvlan,vxlan and bridge implement
fdb_add/fdb_del operations.
these operations only operate the private data of net
device. So allowing the unprivileged users who creates
the userns and netns to add/del fdb entries will do no
harm to other netns.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 9a419b099482..c1e4db60eeca 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -2058,9 +2058,6 @@ static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
2058 | u8 *addr; | 2058 | u8 *addr; |
2059 | int err; | 2059 | int err; |
2060 | 2060 | ||
2061 | if (!capable(CAP_NET_ADMIN)) | ||
2062 | return -EPERM; | ||
2063 | |||
2064 | err = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, NULL); | 2061 | err = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, NULL); |
2065 | if (err < 0) | 2062 | if (err < 0) |
2066 | return err; | 2063 | return err; |
@@ -2127,9 +2124,6 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) | |||
2127 | int err = -EINVAL; | 2124 | int err = -EINVAL; |
2128 | __u8 *addr; | 2125 | __u8 *addr; |
2129 | 2126 | ||
2130 | if (!capable(CAP_NET_ADMIN)) | ||
2131 | return -EPERM; | ||
2132 | |||
2133 | if (nlmsg_len(nlh) < sizeof(*ndm)) | 2127 | if (nlmsg_len(nlh) < sizeof(*ndm)) |
2134 | return -EINVAL; | 2128 | return -EINVAL; |
2135 | 2129 | ||