summaryrefslogtreecommitdiffstats
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2007-12-08 09:09:24 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-28 23:56:56 +0100
commit024626e36d75fc8c6e32d50d4c68bfc3b8df5fdf (patch)
treeada6c8c215a5c4fa57e9e34f3b139609b95b2c5f /include/net/net_namespace.h
parent[SNMP]: Remove unused devconf macros. (diff)
downloadlinux-024626e36d75fc8c6e32d50d4c68bfc3b8df5fdf.tar.xz
linux-024626e36d75fc8c6e32d50d4c68bfc3b8df5fdf.zip
[NET] sysctl: make the sys.net.core sysctls per-namespace
Making them per-namespace is required for the following two reasons: First, some ctl values have a per-namespace meaning. Second, making them writable from the sub-namespace is an isolation hole. So I introduce the pernet operations to create these tables. For init_net I use the existing statically declared tables, for sub-namespace they are duplicated and the write bits are removed from the mode. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index f97b2a4469ae..d5936115d972 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -37,6 +37,9 @@ struct net {
struct sock *rtnl; /* rtnetlink socket */
+ /* core sysctls */
+ struct ctl_table_header *sysctl_core_hdr;
+
/* List of all packet sockets. */
rwlock_t packet_sklist_lock;
struct hlist_head packet_sklist;