diff options
-rw-r--r-- | include/net/sock.h | 4 | ||||
-rw-r--r-- | net/core/sysctl_net_core.c | 19 | ||||
-rw-r--r-- | net/sysctl_net.c | 6 |
3 files changed, 18 insertions, 11 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 800e73a62d8f..4ce37ce8c411 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1325,10 +1325,6 @@ extern __u32 sysctl_rmem_max; | |||
1325 | 1325 | ||
1326 | extern void sk_init(void); | 1326 | extern void sk_init(void); |
1327 | 1327 | ||
1328 | #ifdef CONFIG_SYSCTL | ||
1329 | extern struct ctl_table core_table[]; | ||
1330 | #endif | ||
1331 | |||
1332 | extern int sysctl_optmem_max; | 1328 | extern int sysctl_optmem_max; |
1333 | 1329 | ||
1334 | extern __u32 sysctl_wmem_default; | 1330 | extern __u32 sysctl_wmem_default; |
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c index 277c8faaf732..e322713e590a 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c | |||
@@ -10,10 +10,11 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/socket.h> | 11 | #include <linux/socket.h> |
12 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
13 | #include <linux/init.h> | ||
13 | #include <net/sock.h> | 14 | #include <net/sock.h> |
14 | #include <net/xfrm.h> | 15 | #include <net/xfrm.h> |
15 | 16 | ||
16 | ctl_table core_table[] = { | 17 | static struct ctl_table net_core_table[] = { |
17 | #ifdef CONFIG_NET | 18 | #ifdef CONFIG_NET |
18 | { | 19 | { |
19 | .ctl_name = NET_CORE_WMEM_MAX, | 20 | .ctl_name = NET_CORE_WMEM_MAX, |
@@ -149,3 +150,19 @@ ctl_table core_table[] = { | |||
149 | }, | 150 | }, |
150 | { .ctl_name = 0 } | 151 | { .ctl_name = 0 } |
151 | }; | 152 | }; |
153 | |||
154 | static __initdata struct ctl_path net_core_path[] = { | ||
155 | { .procname = "net", .ctl_name = CTL_NET, }, | ||
156 | { .procname = "core", .ctl_name = NET_CORE, }, | ||
157 | { }, | ||
158 | }; | ||
159 | |||
160 | static __init int sysctl_core_init(void) | ||
161 | { | ||
162 | struct ctl_table_header *hdr; | ||
163 | |||
164 | hdr = register_sysctl_paths(net_core_path, net_core_table); | ||
165 | return hdr == NULL ? -ENOMEM : 0; | ||
166 | } | ||
167 | |||
168 | __initcall(sysctl_core_init); | ||
diff --git a/net/sysctl_net.c b/net/sysctl_net.c index c50c793aa7f0..747fc55b28f1 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c | |||
@@ -31,12 +31,6 @@ | |||
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | struct ctl_table net_table[] = { | 33 | struct ctl_table net_table[] = { |
34 | { | ||
35 | .ctl_name = NET_CORE, | ||
36 | .procname = "core", | ||
37 | .mode = 0555, | ||
38 | .child = core_table, | ||
39 | }, | ||
40 | #ifdef CONFIG_INET | 34 | #ifdef CONFIG_INET |
41 | { | 35 | { |
42 | .ctl_name = NET_IPV4, | 36 | .ctl_name = NET_IPV4, |