[NETNS45][PATCH 1/1] Fix network namespace unshare support.

benjamin.thery at bull.net benjamin.thery at bull.net
Fri Sep 14 09:26:38 PDT 2007


Add CLONE_NEWNET flag in sys_unshare() test.

This patch should be merged with commit: 
"net: Add network namespace clone & unshare support."

Signed-off-by: Benjamin Thery <benjamin.thery at bull.net>
---
 kernel/fork.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6-netns/kernel/fork.c
===================================================================
--- linux-2.6-netns.orig/kernel/fork.c
+++ linux-2.6-netns/kernel/fork.c
@@ -1608,7 +1608,8 @@ asmlinkage long sys_unshare(unsigned lon
 	err = -EINVAL;
 	if (unshare_flags & ~(CLONE_THREAD|CLONE_FS|CLONE_NEWNS|CLONE_SIGHAND|
 				CLONE_VM|CLONE_FILES|CLONE_SYSVSEM|
-				CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWUSER))
+				CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWUSER|
+				CLONE_NEWNET))
 		goto bad_unshare_out;
 
 	if ((err = unshare_thread(unshare_flags)))

-- 


More information about the Containers mailing list