netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/4]netns: fdb: allow unprivileged users to add/del fdb entries
@ 2013-02-01  2:30 Gao feng
  2013-02-01  2:30 ` [PATCH net-next 2/4] netns: ebtable: allow unprivileged users to operate ebtables Gao feng
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Gao feng @ 2013-02-01  2:30 UTC (permalink / raw)
  To: davem; +Cc: netdev, containers, ebiederm, serge, pablo, amwang, Gao feng

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>
---
 net/core/rtnetlink.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 9a419b0..c1e4db6 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;
 
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-02-04 18:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-01  2:30 [PATCH net-next 1/4]netns: fdb: allow unprivileged users to add/del fdb entries Gao feng
2013-02-01  2:30 ` [PATCH net-next 2/4] netns: ebtable: allow unprivileged users to operate ebtables Gao feng
     [not found]   ` <1359685860-29636-2-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-02-04 18:12     ` David Miller
2013-02-01  2:31 ` [PATCH net-next 4/4] netns: bond: allow unprivileged users to control bond device Gao feng
     [not found]   ` <1359685860-29636-4-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-02-04 18:13     ` David Miller
     [not found] ` <1359685860-29636-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-02-01  2:30   ` [PATCH net-next 3/4] netns: bridge: allow unprivileged users add/delete mdb entry Gao feng
2013-02-01  3:46     ` Matt Helsley
2013-02-01  3:59       ` Gao feng
     [not found]         ` <510B3D87.6050908-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-02-01  4:11           ` Matt Helsley
     [not found]     ` <1359685860-29636-3-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-02-04 18:13       ` David Miller
2013-02-04 18:12   ` [PATCH net-next 1/4]netns: fdb: allow unprivileged users to add/del fdb entries David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).