Re: [PATCH 8/8] net: Implement socketat.

From: Eric W. Biederman
Date: Mon Oct 04 2010 - 15:08:25 EST


jamal <hadi@xxxxxxxxxx> writes:

> One thing still confuses me...
> The app control point is in namespace0. I still want to be able to
> "boot" namespaces first and maybe a few seconds later do a socketat()...
> and create devices, tcp sockets etc. I suspect create_ns(namespace-name)
> would involve:
> * open /proc/self/ns/net (namespace-name)
> * unshare the netns
> Is this correct?

Almost.

create should be:
* verify namespace-name is not already in use
* mkdir -p /var/run/netns/<namespace-name>
* unshare the netns
* mount --bind /proc/self/ns/net /var/run/netns/<namespace-name>

Are you talking about an replacing something that used to use the linux
vrf patches that are floating around?

Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/