aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorGao feng <gaofeng@cn.fujitsu.com>2013-01-31 16:30:57 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-04 13:12:16 -0500
commitc5c351088ae76b46ae08dec1bb7f621e0721c78b (patch)
tree00fb5fb0194caa7ea89beb53621de4fe65adb68f /net
parentstmmac: don't return zero on failure path in stmmac_pci_probe() (diff)
downloadlinux-dev-c5c351088ae76b46ae08dec1bb7f621e0721c78b.tar.xz
linux-dev-c5c351088ae76b46ae08dec1bb7f621e0721c78b.zip
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')
-rw-r--r--net/core/rtnetlink.c6
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)
u8 *addr;
int err;
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
-
err = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, NULL);
if (err < 0)
return err;
@@ -2127,9 +2124,6 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
int err = -EINVAL;
__u8 *addr;
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
-
if (nlmsg_len(nlh) < sizeof(*ndm))
return -EINVAL;