[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1266931623.3973.643.camel@bigi>
Date: Tue, 23 Feb 2010 08:27:03 -0500
From: jamal <hadi@...erus.ca>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Patrick McHardy <kaber@...sh.net>,
Linux Netdev List <netdev@...r.kernel.org>,
containers@...ts.linux-foundation.org,
Netfilter Development Mailinglist
<netfilter-devel@...r.kernel.org>,
Ben Greear <greearb@...delatech.com>
Subject: Re: RFC: netfilter: nf_conntrack: add support for "conntrack zones"
On Mon, 2010-02-22 at 15:17 -0800, Eric W. Biederman wrote:
> 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 */
The other two below make some sense; For the above:
Does the point after sys_setns(fd) allow me to do io inside
ns <name>? Can i do open() and get a fd from ns <name>?
> "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.
The only problem that i see is events are not as nice. I take it i am
going to get something like an inotify when a new namespace is created?
> Using genetlink userspace doesn't result in a nestable implementation
> unless I introduce yet another namespace, ugh.
Is it not just a naming convention that you are dealing with?
Example in your scheme above a nested namespace shows up as:
/var/run/netns/<name>/<nestedname>, no?
cheers,
jamal
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists