diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-12-08 03:12:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:56:57 -0500 |
commit | b8e1f9b5c37e77cc8f978a58859b35fe5edd5542 (patch) | |
tree | 3c39da61f10eeb8b8e200ec68770128f1b57f25d /net/core | |
parent | 790a35328991b01181ff5624bdb084053b6fac54 (diff) |
[NET] sysctl: make sysctl_somaxconn per-namespace
Just move the variable on the struct net and adjust
its usage.
Others sysctls from sys.net.core table are more
difficult to virtualize (i.e. make them per-namespace),
but I'll look at them as well a bit later.
Signed-off-by: Pavel Emelyanov <xemul@oenvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/sysctl_net_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index dc4cf7dda9d1..130338f83ae5 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c | |||
@@ -127,7 +127,7 @@ static struct ctl_table net_core_table[] = { | |||
127 | { | 127 | { |
128 | .ctl_name = NET_CORE_SOMAXCONN, | 128 | .ctl_name = NET_CORE_SOMAXCONN, |
129 | .procname = "somaxconn", | 129 | .procname = "somaxconn", |
130 | .data = &sysctl_somaxconn, | 130 | .data = &init_net.sysctl_somaxconn, |
131 | .maxlen = sizeof(int), | 131 | .maxlen = sizeof(int), |
132 | .mode = 0644, | 132 | .mode = 0644, |
133 | .proc_handler = &proc_dointvec | 133 | .proc_handler = &proc_dointvec |
@@ -161,6 +161,8 @@ static __net_init int sysctl_core_net_init(struct net *net) | |||
161 | { | 161 | { |
162 | struct ctl_table *tbl, *tmp; | 162 | struct ctl_table *tbl, *tmp; |
163 | 163 | ||
164 | net->sysctl_somaxconn = SOMAXCONN; | ||
165 | |||
164 | tbl = net_core_table; | 166 | tbl = net_core_table; |
165 | if (net != &init_net) { | 167 | if (net != &init_net) { |
166 | tbl = kmemdup(tbl, sizeof(net_core_table), GFP_KERNEL); | 168 | tbl = kmemdup(tbl, sizeof(net_core_table), GFP_KERNEL); |