[PATCH] net: Add network namespace clone & unshare support.

Eric W. Biederman ebiederm at xmission.com
Thu Sep 27 10:14:33 PDT 2007


Cedric Le Goater <clg at fr.ibm.com> writes:

>> diff --git a/include/linux/sched.h b/include/linux/sched.h
>> index a01ac6d..e10a0a8 100644
>> --- a/include/linux/sched.h
>> +++ b/include/linux/sched.h
>> @@ -27,6 +27,7 @@
>>  #define CLONE_NEWUTS		0x04000000	/* New utsname group? */
>>  #define CLONE_NEWIPC		0x08000000	/* New ipcs */
>> #define CLONE_NEWUSER 0x10000000 /* New user namespace */
>> +#define CLONE_NEWNET		0x20000000	/* New network namespace */
>
> This new flag is going to conflict with the pid namespace flag 
> CLONE_NEWPID in -mm. It might be worth changing it to:
>
> #define CLONE_NEWNET		0x40000000

Interesting, it would have been nice if someone had caught this
detail earlier.  Oh well.

Thanks for pointing this out, it's on my todo list to look into,
and ensure we resolve.

I'm confused because my notes have 0x80000000 for the pid namespace,
and 0x40000000 for the time namespace.

> The changes in nxproxy.c and fork.c will also conflict but I don't 
> think we can do much about it for now.

They should also be fairly easy conflicts to resolve.

I guess we are likely to hit this conflict in the next -mm or the
merge window, which ever comes first.

Eric


More information about the Containers mailing list