diff options
Diffstat (limited to 'net/ipv6/sysctl_net_ipv6.c')
-rw-r--r-- | net/ipv6/sysctl_net_ipv6.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 0dc6a4e5ed4a..fa1d8f4e0051 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/sysctl.h> | 9 | #include <linux/sysctl.h> |
10 | #include <linux/in6.h> | 10 | #include <linux/in6.h> |
11 | #include <linux/ipv6.h> | 11 | #include <linux/ipv6.h> |
12 | #include <linux/slab.h> | ||
12 | #include <net/ndisc.h> | 13 | #include <net/ndisc.h> |
13 | #include <net/ipv6.h> | 14 | #include <net/ipv6.h> |
14 | #include <net/addrconf.h> | 15 | #include <net/addrconf.h> |
@@ -16,50 +17,46 @@ | |||
16 | 17 | ||
17 | static ctl_table ipv6_table_template[] = { | 18 | static ctl_table ipv6_table_template[] = { |
18 | { | 19 | { |
19 | .ctl_name = NET_IPV6_ROUTE, | ||
20 | .procname = "route", | 20 | .procname = "route", |
21 | .maxlen = 0, | 21 | .maxlen = 0, |
22 | .mode = 0555, | 22 | .mode = 0555, |
23 | .child = ipv6_route_table_template | 23 | .child = ipv6_route_table_template |
24 | }, | 24 | }, |
25 | { | 25 | { |
26 | .ctl_name = NET_IPV6_ICMP, | ||
27 | .procname = "icmp", | 26 | .procname = "icmp", |
28 | .maxlen = 0, | 27 | .maxlen = 0, |
29 | .mode = 0555, | 28 | .mode = 0555, |
30 | .child = ipv6_icmp_table_template | 29 | .child = ipv6_icmp_table_template |
31 | }, | 30 | }, |
32 | { | 31 | { |
33 | .ctl_name = NET_IPV6_BINDV6ONLY, | ||
34 | .procname = "bindv6only", | 32 | .procname = "bindv6only", |
35 | .data = &init_net.ipv6.sysctl.bindv6only, | 33 | .data = &init_net.ipv6.sysctl.bindv6only, |
36 | .maxlen = sizeof(int), | 34 | .maxlen = sizeof(int), |
37 | .mode = 0644, | 35 | .mode = 0644, |
38 | .proc_handler = proc_dointvec | 36 | .proc_handler = proc_dointvec |
39 | }, | 37 | }, |
40 | { .ctl_name = 0 } | 38 | { } |
41 | }; | 39 | }; |
42 | 40 | ||
43 | static ctl_table ipv6_rotable[] = { | 41 | static ctl_table ipv6_rotable[] = { |
44 | { | 42 | { |
45 | .ctl_name = NET_IPV6_MLD_MAX_MSF, | ||
46 | .procname = "mld_max_msf", | 43 | .procname = "mld_max_msf", |
47 | .data = &sysctl_mld_max_msf, | 44 | .data = &sysctl_mld_max_msf, |
48 | .maxlen = sizeof(int), | 45 | .maxlen = sizeof(int), |
49 | .mode = 0644, | 46 | .mode = 0644, |
50 | .proc_handler = proc_dointvec | 47 | .proc_handler = proc_dointvec |
51 | }, | 48 | }, |
52 | { .ctl_name = 0 } | 49 | { } |
53 | }; | 50 | }; |
54 | 51 | ||
55 | struct ctl_path net_ipv6_ctl_path[] = { | 52 | struct ctl_path net_ipv6_ctl_path[] = { |
56 | { .procname = "net", .ctl_name = CTL_NET, }, | 53 | { .procname = "net", }, |
57 | { .procname = "ipv6", .ctl_name = NET_IPV6, }, | 54 | { .procname = "ipv6", }, |
58 | { }, | 55 | { }, |
59 | }; | 56 | }; |
60 | EXPORT_SYMBOL_GPL(net_ipv6_ctl_path); | 57 | EXPORT_SYMBOL_GPL(net_ipv6_ctl_path); |
61 | 58 | ||
62 | static int ipv6_sysctl_net_init(struct net *net) | 59 | static int __net_init ipv6_sysctl_net_init(struct net *net) |
63 | { | 60 | { |
64 | struct ctl_table *ipv6_table; | 61 | struct ctl_table *ipv6_table; |
65 | struct ctl_table *ipv6_route_table; | 62 | struct ctl_table *ipv6_route_table; |
@@ -102,7 +99,7 @@ out_ipv6_table: | |||
102 | goto out; | 99 | goto out; |
103 | } | 100 | } |
104 | 101 | ||
105 | static void ipv6_sysctl_net_exit(struct net *net) | 102 | static void __net_exit ipv6_sysctl_net_exit(struct net *net) |
106 | { | 103 | { |
107 | struct ctl_table *ipv6_table; | 104 | struct ctl_table *ipv6_table; |
108 | struct ctl_table *ipv6_route_table; | 105 | struct ctl_table *ipv6_route_table; |