Re: RFC: netfilter: nf_conntrack: add support for "conntrack zones"

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Monday, February 22, 2010 - 4:17 pm

jamal <hadi@cyberus.ca> writes:


What I am thinking is:

"ip ns <name> route add blah" is:
fd = open("/var/run/netns/<name>");
sys_setns(fd);  /* Like unshare but takes an existing namespace */
/* Then the rest of the existing ip command */

"ip ns list" is:
dfd = open("/var/run/netns", O_DIRECTORY);
getdents(dfd, buf, count);

"ip ns new <name>" is:
unshare(CLONE_NEWNS);
fd = nsfd(NETNS);
mkdir("/var/run/netns/<name>");
mount("none", "/var/run/netns/<name>", "ns", 0, fd);

Using unix domain names means that which namespaces you see is under
control of userspace.  Which allows for nested containers (something I
use today), and ultimately container migration.

Using genetlink userspace doesn't result in a nestable implementation
unless I introduce yet another namespace, ugh.

Eric
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: RFC: netfilter: nf_conntrack: add support for "conntra ..., Eric W. Biederman, (Mon Feb 22, 4:17 pm)
[RFC][PATCH] ns: Syscalls for better namespace sharing con ..., Eric W. Biederman, (Thu Feb 25, 1:57 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 2:49 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 2:54 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 3:31 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 5:53 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Thu Feb 25, 6:26 pm)
[RFC][PATCH] ns: Syscalls for better namespace sharing con ..., Eric W. Biederman, (Thu Feb 25, 8:15 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 1:35 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 2:24 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 2:42 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 2:49 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 3:16 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Fri Feb 26, 4:13 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Sat Feb 27, 2:04 am)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Sat Feb 27, 2:42 am)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Sat Feb 27, 12:08 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Sat Feb 27, 12:44 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Mon Mar 1, 12:24 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Sukadev Bhattiprolu, (Tue Mar 2, 2:19 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Sukadev Bhattiprolu, (Tue Mar 2, 5:07 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Wed Mar 3, 12:47 pm)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Mon Mar 8, 10:29 am)
Re: [RFC][PATCH] ns: Syscalls for better namespace sharing ..., Eric W. Biederman, (Mon Mar 8, 10:35 am)