Skip to content

Commit

Permalink
netns: fdb: allow unprivileged users to add/del fdb entries
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gao feng authored and David S. Miller committed Feb 4, 2013
1 parent 4f46385 commit c5c3510
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit c5c3510

Please sign in to comment.