From: Eric W. Biederman Date: Wed, 12 Sep 2007 09:55:17 +0000 (+0200) Subject: [NET]: Add a network namespace parameter to tasks X-Git-Tag: v2.6.24-rc1~1454^2~703 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=772698f6362680b65211f7efc68121f1e4c28aa5;p=linux-2.6 [NET]: Add a network namespace parameter to tasks This is the network namespace from which all which all sockets and anything else under user control ultimately get their network namespace parameters. Signed-off-by: Eric W. Biederman Signed-off-by: David S. Miller --- diff --git a/include/linux/init_task.h b/include/linux/init_task.h index f8abfa349e..e2c1ffcff6 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -9,6 +9,7 @@ #include #include #include +#include #define INIT_FDTABLE \ { \ @@ -78,6 +79,7 @@ extern struct nsproxy init_nsproxy; .nslock = __SPIN_LOCK_UNLOCKED(nsproxy.nslock), \ .uts_ns = &init_uts_ns, \ .mnt_ns = NULL, \ + .net_ns = &init_net, \ INIT_IPC_NS(ipc_ns) \ .user_ns = &init_user_ns, \ } diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index ce06188b7a..bec4485e3d 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h @@ -29,6 +29,7 @@ struct nsproxy { struct mnt_namespace *mnt_ns; struct pid_namespace *pid_ns; struct user_namespace *user_ns; + struct net *net_ns; }; extern struct nsproxy init_nsproxy;