aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/802/tr.c7
-rw-r--r--net/appletalk/sysctl_net_atalk.c13
-rw-r--r--net/ax25/sysctl_net_ax25.c38
-rw-r--r--net/bridge/br_netfilter.c6
-rw-r--r--net/core/neighbour.c47
-rw-r--r--net/core/sysctl_net_core.c21
-rw-r--r--net/dccp/sysctl.c8
-rw-r--r--net/decnet/dn_dev.c64
-rw-r--r--net/decnet/sysctl_net_decnet.c123
-rw-r--r--net/ipv4/arp.c2
-rw-r--r--net/ipv4/devinet.c111
-rw-r--r--net/ipv4/ip_fragment.c6
-rw-r--r--net/ipv4/netfilter.c6
-rw-r--r--net/ipv4/netfilter/ip_queue.c3
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c10
-rw-r--r--net/ipv4/netfilter/nf_conntrack_proto_icmp.c8
-rw-r--r--net/ipv4/route.c73
-rw-r--r--net/ipv4/sysctl_net_ipv4.c165
-rw-r--r--net/ipv4/xfrm4_policy.c1
-rw-r--r--net/ipv6/addrconf.c91
-rw-r--r--net/ipv6/icmp.c4
-rw-r--r--net/ipv6/ndisc.c39
-rw-r--r--net/ipv6/netfilter/ip6_queue.c4
-rw-r--r--net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c4
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c4
-rw-r--r--net/ipv6/reassembly.c6
-rw-r--r--net/ipv6/route.c18
-rw-r--r--net/ipv6/sysctl_net_ipv6.c12
-rw-r--r--net/ipv6/xfrm6_policy.c1
-rw-r--r--net/ipx/sysctl_net_ipx.c7
-rw-r--r--net/irda/irsysctl.c31
-rw-r--r--net/llc/sysctl_net_llc.c25
-rw-r--r--net/netfilter/core.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c6
-rw-r--r--net/netfilter/ipvs/ip_vs_lblc.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_lblcr.c2
-rw-r--r--net/netfilter/nf_conntrack_acct.c1
-rw-r--r--net/netfilter/nf_conntrack_ecache.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_dccp.c12
-rw-r--r--net/netfilter/nf_conntrack_proto_generic.c8
-rw-r--r--net/netfilter/nf_conntrack_proto_sctp.c8
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c14
-rw-r--r--net/netfilter/nf_conntrack_proto_udp.c8
-rw-r--r--net/netfilter/nf_conntrack_proto_udplite.c6
-rw-r--r--net/netfilter/nf_conntrack_standalone.c14
-rw-r--r--net/netfilter/nf_log.c7
-rw-r--r--net/netrom/sysctl_net_netrom.c30
-rw-r--r--net/phonet/sysctl.c8
-rw-r--r--net/rds/ib_sysctl.c26
-rw-r--r--net/rds/iw_sysctl.c26
-rw-r--r--net/rds/sysctl.c21
-rw-r--r--net/rose/sysctl_net_rose.c26
-rw-r--r--net/sctp/sysctl.c52
-rw-r--r--net/sunrpc/sysctl.c15
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma.c40
-rw-r--r--net/sunrpc/xprtrdma/transport.c32
-rw-r--r--net/sunrpc/xprtsock.c28
-rw-r--r--net/unix/sysctl_net_unix.c7
-rw-r--r--net/x25/sysctl_net_x25.c15
-rw-r--r--net/xfrm/xfrm_sysctl.c4
60 files changed, 207 insertions, 1175 deletions
diff --git a/net/802/tr.c b/net/802/tr.c
index e874447ad144..44acce47fcdc 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -635,19 +635,18 @@ struct net_device *alloc_trdev(int sizeof_priv)
635#ifdef CONFIG_SYSCTL 635#ifdef CONFIG_SYSCTL
636static struct ctl_table tr_table[] = { 636static struct ctl_table tr_table[] = {
637 { 637 {
638 .ctl_name = NET_TR_RIF_TIMEOUT,
639 .procname = "rif_timeout", 638 .procname = "rif_timeout",
640 .data = &sysctl_tr_rif_timeout, 639 .data = &sysctl_tr_rif_timeout,
641 .maxlen = sizeof(int), 640 .maxlen = sizeof(int),
642 .mode = 0644, 641 .mode = 0644,
643 .proc_handler = proc_dointvec 642 .proc_handler = proc_dointvec
644 }, 643 },
645 { 0 }, 644 { },
646}; 645};
647 646
648static __initdata struct ctl_path tr_path[] = { 647static __initdata struct ctl_path tr_path[] = {
649 { .procname = "net", .ctl_name = CTL_NET, }, 648 { .procname = "net", },
650 { .procname = "token-ring", .ctl_name = NET_TR, }, 649 { .procname = "token-ring", },
651 { } 650 { }
652}; 651};
653#endif 652#endif
diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c
index 8d237b15183b..04e9c0da7aa9 100644
--- a/net/appletalk/sysctl_net_atalk.c
+++ b/net/appletalk/sysctl_net_atalk.c
@@ -12,25 +12,20 @@
12 12
13static struct ctl_table atalk_table[] = { 13static struct ctl_table atalk_table[] = {
14 { 14 {
15 .ctl_name = NET_ATALK_AARP_EXPIRY_TIME,
16 .procname = "aarp-expiry-time", 15 .procname = "aarp-expiry-time",
17 .data = &sysctl_aarp_expiry_time, 16 .data = &sysctl_aarp_expiry_time,
18 .maxlen = sizeof(int), 17 .maxlen = sizeof(int),
19 .mode = 0644, 18 .mode = 0644,
20 .proc_handler = proc_dointvec_jiffies, 19 .proc_handler = proc_dointvec_jiffies,
21 .strategy = sysctl_jiffies,
22 }, 20 },
23 { 21 {
24 .ctl_name = NET_ATALK_AARP_TICK_TIME,
25 .procname = "aarp-tick-time", 22 .procname = "aarp-tick-time",
26 .data = &sysctl_aarp_tick_time, 23 .data = &sysctl_aarp_tick_time,
27 .maxlen = sizeof(int), 24 .maxlen = sizeof(int),
28 .mode = 0644, 25 .mode = 0644,
29 .proc_handler = proc_dointvec_jiffies, 26 .proc_handler = proc_dointvec_jiffies,
30 .strategy = sysctl_jiffies,
31 }, 27 },
32 { 28 {
33 .ctl_name = NET_ATALK_AARP_RETRANSMIT_LIMIT,
34 .procname = "aarp-retransmit-limit", 29 .procname = "aarp-retransmit-limit",
35 .data = &sysctl_aarp_retransmit_limit, 30 .data = &sysctl_aarp_retransmit_limit,
36 .maxlen = sizeof(int), 31 .maxlen = sizeof(int),
@@ -38,20 +33,18 @@ static struct ctl_table atalk_table[] = {
38 .proc_handler = proc_dointvec, 33 .proc_handler = proc_dointvec,
39 }, 34 },
40 { 35 {
41 .ctl_name = NET_ATALK_AARP_RESOLVE_TIME,
42 .procname = "aarp-resolve-time", 36 .procname = "aarp-resolve-time",
43 .data = &sysctl_aarp_resolve_time, 37 .data = &sysctl_aarp_resolve_time,
44 .maxlen = sizeof(int), 38 .maxlen = sizeof(int),
45 .mode = 0644, 39 .mode = 0644,
46 .proc_handler = proc_dointvec_jiffies, 40 .proc_handler = proc_dointvec_jiffies,
47 .strategy = sysctl_jiffies,
48 }, 41 },
49 { 0 }, 42 { },
50}; 43};
51 44
52static struct ctl_path atalk_path[] = { 45static struct ctl_path atalk_path[] = {
53 { .procname = "net", .ctl_name = CTL_NET, }, 46 { .procname = "net", },
54 { .procname = "appletalk", .ctl_name = NET_ATALK, }, 47 { .procname = "appletalk", },
55 { } 48 { }
56}; 49};
57 50
diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c
index 62ee3fb34732..5159be6b2625 100644
--- a/net/ax25/sysctl_net_ax25.c
+++ b/net/ax25/sysctl_net_ax25.c
@@ -34,156 +34,128 @@ static ctl_table *ax25_table;
34static int ax25_table_size; 34static int ax25_table_size;
35 35
36static struct ctl_path ax25_path[] = { 36static struct ctl_path ax25_path[] = {
37 { .procname = "net", .ctl_name = CTL_NET, }, 37 { .procname = "net", },
38 { .procname = "ax25", .ctl_name = NET_AX25, }, 38 { .procname = "ax25", },
39 { } 39 { }
40}; 40};
41 41
42static const ctl_table ax25_param_table[] = { 42static const ctl_table ax25_param_table[] = {
43 { 43 {
44 .ctl_name = NET_AX25_IP_DEFAULT_MODE,
45 .procname = "ip_default_mode", 44 .procname = "ip_default_mode",
46 .maxlen = sizeof(int), 45 .maxlen = sizeof(int),
47 .mode = 0644, 46 .mode = 0644,
48 .proc_handler = proc_dointvec_minmax, 47 .proc_handler = proc_dointvec_minmax,
49 .strategy = sysctl_intvec,
50 .extra1 = &min_ipdefmode, 48 .extra1 = &min_ipdefmode,
51 .extra2 = &max_ipdefmode 49 .extra2 = &max_ipdefmode
52 }, 50 },
53 { 51 {
54 .ctl_name = NET_AX25_DEFAULT_MODE,
55 .procname = "ax25_default_mode", 52 .procname = "ax25_default_mode",
56 .maxlen = sizeof(int), 53 .maxlen = sizeof(int),
57 .mode = 0644, 54 .mode = 0644,
58 .proc_handler = proc_dointvec_minmax, 55 .proc_handler = proc_dointvec_minmax,
59 .strategy = sysctl_intvec,
60 .extra1 = &min_axdefmode, 56 .extra1 = &min_axdefmode,
61 .extra2 = &max_axdefmode 57 .extra2 = &max_axdefmode
62 }, 58 },
63 { 59 {
64 .ctl_name = NET_AX25_BACKOFF_TYPE,
65 .procname = "backoff_type", 60 .procname = "backoff_type",
66 .maxlen = sizeof(int), 61 .maxlen = sizeof(int),
67 .mode = 0644, 62 .mode = 0644,
68 .proc_handler = proc_dointvec_minmax, 63 .proc_handler = proc_dointvec_minmax,
69 .strategy = sysctl_intvec,
70 .extra1 = &min_backoff, 64 .extra1 = &min_backoff,
71 .extra2 = &max_backoff 65 .extra2 = &max_backoff
72 }, 66 },
73 { 67 {
74 .ctl_name = NET_AX25_CONNECT_MODE,
75 .procname = "connect_mode", 68 .procname = "connect_mode",
76 .maxlen = sizeof(int), 69 .maxlen = sizeof(int),
77 .mode = 0644, 70 .mode = 0644,
78 .proc_handler = proc_dointvec_minmax, 71 .proc_handler = proc_dointvec_minmax,
79 .strategy = sysctl_intvec,
80 .extra1 = &min_conmode, 72 .extra1 = &min_conmode,
81 .extra2 = &max_conmode 73 .extra2 = &max_conmode
82 }, 74 },
83 { 75 {
84 .ctl_name = NET_AX25_STANDARD_WINDOW,
85 .procname = "standard_window_size", 76 .procname = "standard_window_size",
86 .maxlen = sizeof(int), 77 .maxlen = sizeof(int),
87 .mode = 0644, 78 .mode = 0644,
88 .proc_handler = proc_dointvec_minmax, 79 .proc_handler = proc_dointvec_minmax,
89 .strategy = sysctl_intvec,
90 .extra1 = &min_window, 80 .extra1 = &min_window,
91 .extra2 = &max_window 81 .extra2 = &max_window
92 }, 82 },
93 { 83 {
94 .ctl_name = NET_AX25_EXTENDED_WINDOW,
95 .procname = "extended_window_size", 84 .procname = "extended_window_size",
96 .maxlen = sizeof(int), 85 .maxlen = sizeof(int),
97 .mode = 0644, 86 .mode = 0644,
98 .proc_handler = proc_dointvec_minmax, 87 .proc_handler = proc_dointvec_minmax,
99 .strategy = sysctl_intvec,
100 .extra1 = &min_ewindow, 88 .extra1 = &min_ewindow,
101 .extra2 = &max_ewindow 89 .extra2 = &max_ewindow
102 }, 90 },
103 { 91 {
104 .ctl_name = NET_AX25_T1_TIMEOUT,
105 .procname = "t1_timeout", 92 .procname = "t1_timeout",
106 .maxlen = sizeof(int), 93 .maxlen = sizeof(int),
107 .mode = 0644, 94 .mode = 0644,
108 .proc_handler = proc_dointvec_minmax, 95 .proc_handler = proc_dointvec_minmax,
109 .strategy = sysctl_intvec,
110 .extra1 = &min_t1, 96 .extra1 = &min_t1,
111 .extra2 = &max_t1 97 .extra2 = &max_t1
112 }, 98 },
113 { 99 {
114 .ctl_name = NET_AX25_T2_TIMEOUT,
115 .procname = "t2_timeout", 100 .procname = "t2_timeout",
116 .maxlen = sizeof(int), 101 .maxlen = sizeof(int),
117 .mode = 0644, 102 .mode = 0644,
118 .proc_handler = proc_dointvec_minmax, 103 .proc_handler = proc_dointvec_minmax,
119 .strategy = sysctl_intvec,
120 .extra1 = &min_t2, 104 .extra1 = &min_t2,
121 .extra2 = &max_t2 105 .extra2 = &max_t2
122 }, 106 },
123 { 107 {
124 .ctl_name = NET_AX25_T3_TIMEOUT,
125 .procname = "t3_timeout", 108 .procname = "t3_timeout",
126 .maxlen = sizeof(int), 109 .maxlen = sizeof(int),
127 .mode = 0644, 110 .mode = 0644,
128 .proc_handler = proc_dointvec_minmax, 111 .proc_handler = proc_dointvec_minmax,
129 .strategy = sysctl_intvec,
130 .extra1 = &min_t3, 112 .extra1 = &min_t3,
131 .extra2 = &max_t3 113 .extra2 = &max_t3
132 }, 114 },
133 { 115 {
134 .ctl_name = NET_AX25_IDLE_TIMEOUT,
135 .procname = "idle_timeout", 116 .procname = "idle_timeout",
136 .maxlen = sizeof(int), 117 .maxlen = sizeof(int),
137 .mode = 0644, 118 .mode = 0644,
138 .proc_handler = proc_dointvec_minmax, 119 .proc_handler = proc_dointvec_minmax,
139 .strategy = sysctl_intvec,
140 .extra1 = &min_idle, 120 .extra1 = &min_idle,
141 .extra2 = &max_idle 121 .extra2 = &max_idle
142 }, 122 },
143 { 123 {
144 .ctl_name = NET_AX25_N2,
145 .procname = "maximum_retry_count", 124 .procname = "maximum_retry_count",
146 .maxlen = sizeof(int), 125 .maxlen = sizeof(int),
147 .mode = 0644, 126 .mode = 0644,
148 .proc_handler = proc_dointvec_minmax, 127 .proc_handler = proc_dointvec_minmax,
149 .strategy = sysctl_intvec,
150 .extra1 = &min_n2, 128 .extra1 = &min_n2,
151 .extra2 = &max_n2 129 .extra2 = &max_n2
152 }, 130 },
153 { 131 {
154 .ctl_name = NET_AX25_PACLEN,
155 .procname = "maximum_packet_length", 132 .procname = "maximum_packet_length",
156 .maxlen = sizeof(int), 133 .maxlen = sizeof(int),
157 .mode = 0644, 134 .mode = 0644,
158 .proc_handler = proc_dointvec_minmax, 135 .proc_handler = proc_dointvec_minmax,
159 .strategy = sysctl_intvec,
160 .extra1 = &min_paclen, 136 .extra1 = &min_paclen,
161 .extra2 = &max_paclen 137 .extra2 = &max_paclen
162 }, 138 },
163 { 139 {
164 .ctl_name = NET_AX25_PROTOCOL,
165 .procname = "protocol", 140 .procname = "protocol",
166 .maxlen = sizeof(int), 141 .maxlen = sizeof(int),
167 .mode = 0644, 142 .mode = 0644,
168 .proc_handler = proc_dointvec_minmax, 143 .proc_handler = proc_dointvec_minmax,
169 .strategy = sysctl_intvec,
170 .extra1 = &min_proto, 144 .extra1 = &min_proto,
171 .extra2 = &max_proto 145 .extra2 = &max_proto
172 }, 146 },
173#ifdef CONFIG_AX25_DAMA_SLAVE 147#ifdef CONFIG_AX25_DAMA_SLAVE
174 { 148 {
175 .ctl_name = NET_AX25_DAMA_SLAVE_TIMEOUT,
176 .procname = "dama_slave_timeout", 149 .procname = "dama_slave_timeout",
177 .maxlen = sizeof(int), 150 .maxlen = sizeof(int),
178 .mode = 0644, 151 .mode = 0644,
179 .proc_handler = proc_dointvec_minmax, 152 .proc_handler = proc_dointvec_minmax,
180 .strategy = sysctl_intvec,
181 .extra1 = &min_ds_timeout, 153 .extra1 = &min_ds_timeout,
182 .extra2 = &max_ds_timeout 154 .extra2 = &max_ds_timeout
183 }, 155 },
184#endif 156#endif
185 157
186 { .ctl_name = 0 } /* that's all, folks! */ 158 { } /* that's all, folks! */
187}; 159};
188 160
189void ax25_register_sysctl(void) 161void ax25_register_sysctl(void)
@@ -212,11 +184,9 @@ void ax25_register_sysctl(void)
212 return; 184 return;
213 } 185 }
214 ax25_table[n].child = ax25_dev->systable = child; 186 ax25_table[n].child = ax25_dev->systable = child;
215 ax25_table[n].ctl_name = n + 1;
216 ax25_table[n].procname = ax25_dev->dev->name; 187 ax25_table[n].procname = ax25_dev->dev->name;
217 ax25_table[n].mode = 0555; 188 ax25_table[n].mode = 0555;
218 189
219 child[AX25_MAX_VALUES].ctl_name = 0; /* just in case... */
220 190
221 for (k = 0; k < AX25_MAX_VALUES; k++) 191 for (k = 0; k < AX25_MAX_VALUES; k++)
222 child[k].data = &ax25_dev->values[k]; 192 child[k].data = &ax25_dev->values[k];
@@ -233,7 +203,7 @@ void ax25_unregister_sysctl(void)
233 ctl_table *p; 203 ctl_table *p;
234 unregister_sysctl_table(ax25_table_header); 204 unregister_sysctl_table(ax25_table_header);
235 205
236 for (p = ax25_table; p->ctl_name; p++) 206 for (p = ax25_table; p->procname; p++)
237 kfree(p->child); 207 kfree(p->child);
238 kfree(ax25_table); 208 kfree(ax25_table);
239} 209}
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index a16a2342f6bf..268e2e725888 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -1013,12 +1013,12 @@ static ctl_table brnf_table[] = {
1013 .mode = 0644, 1013 .mode = 0644,
1014 .proc_handler = brnf_sysctl_call_tables, 1014 .proc_handler = brnf_sysctl_call_tables,
1015 }, 1015 },
1016 { .ctl_name = 0 } 1016 { }
1017}; 1017};
1018 1018
1019static struct ctl_path brnf_path[] = { 1019static struct ctl_path brnf_path[] = {
1020 { .procname = "net", .ctl_name = CTL_NET, }, 1020 { .procname = "net", },
1021 { .procname = "bridge", .ctl_name = NET_BRIDGE, }, 1021 { .procname = "bridge", },
1022 { } 1022 { }
1023}; 1023};
1024#endif 1024#endif
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index a08a35bf0a7b..f35377b643e4 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2566,21 +2566,18 @@ static struct neigh_sysctl_table {
2566} neigh_sysctl_template __read_mostly = { 2566} neigh_sysctl_template __read_mostly = {
2567 .neigh_vars = { 2567 .neigh_vars = {
2568 { 2568 {
2569 .ctl_name = NET_NEIGH_MCAST_SOLICIT,
2570 .procname = "mcast_solicit", 2569 .procname = "mcast_solicit",
2571 .maxlen = sizeof(int), 2570 .maxlen = sizeof(int),
2572 .mode = 0644, 2571 .mode = 0644,
2573 .proc_handler = proc_dointvec, 2572 .proc_handler = proc_dointvec,
2574 }, 2573 },
2575 { 2574 {
2576 .ctl_name = NET_NEIGH_UCAST_SOLICIT,
2577 .procname = "ucast_solicit", 2575 .procname = "ucast_solicit",
2578 .maxlen = sizeof(int), 2576 .maxlen = sizeof(int),
2579 .mode = 0644, 2577 .mode = 0644,
2580 .proc_handler = proc_dointvec, 2578 .proc_handler = proc_dointvec,
2581 }, 2579 },
2582 { 2580 {
2583 .ctl_name = NET_NEIGH_APP_SOLICIT,
2584 .procname = "app_solicit", 2581 .procname = "app_solicit",
2585 .maxlen = sizeof(int), 2582 .maxlen = sizeof(int),
2586 .mode = 0644, 2583 .mode = 0644,
@@ -2593,38 +2590,30 @@ static struct neigh_sysctl_table {
2593 .proc_handler = proc_dointvec_userhz_jiffies, 2590 .proc_handler = proc_dointvec_userhz_jiffies,
2594 }, 2591 },
2595 { 2592 {
2596 .ctl_name = NET_NEIGH_REACHABLE_TIME,
2597 .procname = "base_reachable_time", 2593 .procname = "base_reachable_time",
2598 .maxlen = sizeof(int), 2594 .maxlen = sizeof(int),
2599 .mode = 0644, 2595 .mode = 0644,
2600 .proc_handler = proc_dointvec_jiffies, 2596 .proc_handler = proc_dointvec_jiffies,
2601 .strategy = sysctl_jiffies,
2602 }, 2597 },
2603 { 2598 {
2604 .ctl_name = NET_NEIGH_DELAY_PROBE_TIME,
2605 .procname = "delay_first_probe_time", 2599 .procname = "delay_first_probe_time",
2606 .maxlen = sizeof(int), 2600 .maxlen = sizeof(int),
2607 .mode = 0644, 2601 .mode = 0644,
2608 .proc_handler = proc_dointvec_jiffies, 2602 .proc_handler = proc_dointvec_jiffies,
2609 .strategy = sysctl_jiffies,
2610 }, 2603 },
2611 { 2604 {
2612 .ctl_name = NET_NEIGH_GC_STALE_TIME,
2613 .procname = "gc_stale_time", 2605 .procname = "gc_stale_time",
2614 .maxlen = sizeof(int), 2606 .maxlen = sizeof(int),
2615 .mode = 0644, 2607 .mode = 0644,
2616 .proc_handler = proc_dointvec_jiffies, 2608 .proc_handler = proc_dointvec_jiffies,
2617 .strategy = sysctl_jiffies,
2618 }, 2609 },
2619 { 2610 {
2620 .ctl_name = NET_NEIGH_UNRES_QLEN,
2621 .procname = "unres_qlen", 2611 .procname = "unres_qlen",
2622 .maxlen = sizeof(int), 2612 .maxlen = sizeof(int),
2623 .mode = 0644, 2613 .mode = 0644,
2624 .proc_handler = proc_dointvec, 2614 .proc_handler = proc_dointvec,
2625 }, 2615 },
2626 { 2616 {
2627 .ctl_name = NET_NEIGH_PROXY_QLEN,
2628 .procname = "proxy_qlen", 2617 .procname = "proxy_qlen",
2629 .maxlen = sizeof(int), 2618 .maxlen = sizeof(int),
2630 .mode = 0644, 2619 .mode = 0644,
@@ -2649,45 +2638,36 @@ static struct neigh_sysctl_table {
2649 .proc_handler = proc_dointvec_userhz_jiffies, 2638 .proc_handler = proc_dointvec_userhz_jiffies,
2650 }, 2639 },
2651 { 2640 {
2652 .ctl_name = NET_NEIGH_RETRANS_TIME_MS,
2653 .procname = "retrans_time_ms", 2641 .procname = "retrans_time_ms",
2654 .maxlen = sizeof(int), 2642 .maxlen = sizeof(int),
2655 .mode = 0644, 2643 .mode = 0644,
2656 .proc_handler = proc_dointvec_ms_jiffies, 2644 .proc_handler = proc_dointvec_ms_jiffies,
2657 .strategy = sysctl_ms_jiffies,
2658 }, 2645 },
2659 { 2646 {
2660 .ctl_name = NET_NEIGH_REACHABLE_TIME_MS,
2661 .procname = "base_reachable_time_ms", 2647 .procname = "base_reachable_time_ms",
2662 .maxlen = sizeof(int), 2648 .maxlen = sizeof(int),
2663 .mode = 0644, 2649 .mode = 0644,
2664 .proc_handler = proc_dointvec_ms_jiffies, 2650 .proc_handler = proc_dointvec_ms_jiffies,
2665 .strategy = sysctl_ms_jiffies,
2666 }, 2651 },
2667 { 2652 {
2668 .ctl_name = NET_NEIGH_GC_INTERVAL,
2669 .procname = "gc_interval", 2653 .procname = "gc_interval",
2670 .maxlen = sizeof(int), 2654 .maxlen = sizeof(int),
2671 .mode = 0644, 2655 .mode = 0644,
2672 .proc_handler = proc_dointvec_jiffies, 2656 .proc_handler = proc_dointvec_jiffies,
2673 .strategy = sysctl_jiffies,
2674 }, 2657 },
2675 { 2658 {
2676 .ctl_name = NET_NEIGH_GC_THRESH1,
2677 .procname = "gc_thresh1", 2659 .procname = "gc_thresh1",
2678 .maxlen = sizeof(int), 2660 .maxlen = sizeof(int),
2679 .mode = 0644, 2661 .mode = 0644,
2680 .proc_handler = proc_dointvec, 2662 .proc_handler = proc_dointvec,
2681 }, 2663 },
2682 { 2664 {
2683 .ctl_name = NET_NEIGH_GC_THRESH2,
2684 .procname = "gc_thresh2", 2665 .procname = "gc_thresh2",
2685 .maxlen = sizeof(int), 2666 .maxlen = sizeof(int),
2686 .mode = 0644, 2667 .mode = 0644,
2687 .proc_handler = proc_dointvec, 2668 .proc_handler = proc_dointvec,
2688 }, 2669 },
2689 { 2670 {
2690 .ctl_name = NET_NEIGH_GC_THRESH3,
2691 .procname = "gc_thresh3", 2671 .procname = "gc_thresh3",
2692 .maxlen = sizeof(int), 2672 .maxlen = sizeof(int),
2693 .mode = 0644, 2673 .mode = 0644,
@@ -2699,7 +2679,7 @@ static struct neigh_sysctl_table {
2699 2679
2700int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, 2680int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
2701 int p_id, int pdev_id, char *p_name, 2681 int p_id, int pdev_id, char *p_name,
2702 proc_handler *handler, ctl_handler *strategy) 2682 proc_handler *handler)
2703{ 2683{
2704 struct neigh_sysctl_table *t; 2684 struct neigh_sysctl_table *t;
2705 const char *dev_name_source = NULL; 2685 const char *dev_name_source = NULL;
@@ -2710,10 +2690,10 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
2710#define NEIGH_CTL_PATH_DEV 3 2690#define NEIGH_CTL_PATH_DEV 3
2711 2691
2712 struct ctl_path neigh_path[] = { 2692 struct ctl_path neigh_path[] = {
2713 { .procname = "net", .ctl_name = CTL_NET, }, 2693 { .procname = "net", },
2714 { .procname = "proto", .ctl_name = 0, }, 2694 { .procname = "proto", },
2715 { .procname = "neigh", .ctl_name = 0, }, 2695 { .procname = "neigh", },
2716 { .procname = "default", .ctl_name = NET_PROTO_CONF_DEFAULT, }, 2696 { .procname = "default", },
2717 { }, 2697 { },
2718 }; 2698 };
2719 2699
@@ -2738,7 +2718,6 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
2738 2718
2739 if (dev) { 2719 if (dev) {
2740 dev_name_source = dev->name; 2720 dev_name_source = dev->name;
2741 neigh_path[NEIGH_CTL_PATH_DEV].ctl_name = dev->ifindex;
2742 /* Terminate the table early */ 2721 /* Terminate the table early */
2743 memset(&t->neigh_vars[14], 0, sizeof(t->neigh_vars[14])); 2722 memset(&t->neigh_vars[14], 0, sizeof(t->neigh_vars[14]));
2744 } else { 2723 } else {
@@ -2750,31 +2729,19 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
2750 } 2729 }
2751 2730
2752 2731
2753 if (handler || strategy) { 2732 if (handler) {
2754 /* RetransTime */ 2733 /* RetransTime */
2755 t->neigh_vars[3].proc_handler = handler; 2734 t->neigh_vars[3].proc_handler = handler;
2756 t->neigh_vars[3].strategy = strategy;
2757 t->neigh_vars[3].extra1 = dev; 2735 t->neigh_vars[3].extra1 = dev;
2758 if (!strategy)
2759 t->neigh_vars[3].ctl_name = CTL_UNNUMBERED;
2760 /* ReachableTime */ 2736 /* ReachableTime */
2761 t->neigh_vars[4].proc_handler = handler; 2737 t->neigh_vars[4].proc_handler = handler;
2762 t->neigh_vars[4].strategy = strategy;
2763 t->neigh_vars[4].extra1 = dev; 2738 t->neigh_vars[4].extra1 = dev;
2764 if (!strategy)
2765 t->neigh_vars[4].ctl_name = CTL_UNNUMBERED;
2766 /* RetransTime (in milliseconds)*/ 2739 /* RetransTime (in milliseconds)*/
2767 t->neigh_vars[12].proc_handler = handler; 2740 t->neigh_vars[12].proc_handler = handler;
2768 t->neigh_vars[12].strategy = strategy;
2769 t->neigh_vars[12].extra1 = dev; 2741 t->neigh_vars[12].extra1 = dev;
2770 if (!strategy)
2771 t->neigh_vars[12].ctl_name = CTL_UNNUMBERED;
2772 /* ReachableTime (in milliseconds) */ 2742 /* ReachableTime (in milliseconds) */
2773 t->neigh_vars[13].proc_handler = handler; 2743 t->neigh_vars[13].proc_handler = handler;
2774 t->neigh_vars[13].strategy = strategy;
2775 t->neigh_vars[13].extra1 = dev; 2744 t->neigh_vars[13].extra1 = dev;
2776 if (!strategy)
2777 t->neigh_vars[13].ctl_name = CTL_UNNUMBERED;
2778 } 2745 }
2779 2746
2780 t->dev_name = kstrdup(dev_name_source, GFP_KERNEL); 2747 t->dev_name = kstrdup(dev_name_source, GFP_KERNEL);
@@ -2782,9 +2749,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
2782 goto free; 2749 goto free;
2783 2750
2784 neigh_path[NEIGH_CTL_PATH_DEV].procname = t->dev_name; 2751 neigh_path[NEIGH_CTL_PATH_DEV].procname = t->dev_name;
2785 neigh_path[NEIGH_CTL_PATH_NEIGH].ctl_name = pdev_id;
2786 neigh_path[NEIGH_CTL_PATH_PROTO].procname = p_name; 2752 neigh_path[NEIGH_CTL_PATH_PROTO].procname = p_name;
2787 neigh_path[NEIGH_CTL_PATH_PROTO].ctl_name = p_id;
2788 2753
2789 t->sysctl_header = 2754 t->sysctl_header =
2790 register_net_sysctl_table(neigh_parms_net(p), neigh_path, t->neigh_vars); 2755 register_net_sysctl_table(neigh_parms_net(p), neigh_path, t->neigh_vars);
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 8938fa79124d..06124872af5b 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -19,7 +19,6 @@
19static struct ctl_table net_core_table[] = { 19static struct ctl_table net_core_table[] = {
20#ifdef CONFIG_NET 20#ifdef CONFIG_NET
21 { 21 {
22 .ctl_name = NET_CORE_WMEM_MAX,
23 .procname = "wmem_max", 22 .procname = "wmem_max",
24 .data = &sysctl_wmem_max, 23 .data = &sysctl_wmem_max,
25 .maxlen = sizeof(int), 24 .maxlen = sizeof(int),
@@ -27,7 +26,6 @@ static struct ctl_table net_core_table[] = {
27 .proc_handler = proc_dointvec 26 .proc_handler = proc_dointvec
28 }, 27 },
29 { 28 {
30 .ctl_name = NET_CORE_RMEM_MAX,
31 .procname = "rmem_max", 29 .procname = "rmem_max",
32 .data = &sysctl_rmem_max, 30 .data = &sysctl_rmem_max,
33 .maxlen = sizeof(int), 31 .maxlen = sizeof(int),
@@ -35,7 +33,6 @@ static struct ctl_table net_core_table[] = {
35 .proc_handler = proc_dointvec 33 .proc_handler = proc_dointvec
36 }, 34 },
37 { 35 {
38 .ctl_name = NET_CORE_WMEM_DEFAULT,
39 .procname = "wmem_default", 36 .procname = "wmem_default",
40 .data = &sysctl_wmem_default, 37 .data = &sysctl_wmem_default,
41 .maxlen = sizeof(int), 38 .maxlen = sizeof(int),
@@ -43,7 +40,6 @@ static struct ctl_table net_core_table[] = {
43 .proc_handler = proc_dointvec 40 .proc_handler = proc_dointvec
44 }, 41 },
45 { 42 {
46 .ctl_name = NET_CORE_RMEM_DEFAULT,
47 .procname = "rmem_default", 43 .procname = "rmem_default",
48 .data = &sysctl_rmem_default, 44 .data = &sysctl_rmem_default,
49 .maxlen = sizeof(int), 45 .maxlen = sizeof(int),
@@ -51,7 +47,6 @@ static struct ctl_table net_core_table[] = {
51 .proc_handler = proc_dointvec 47 .proc_handler = proc_dointvec
52 }, 48 },
53 { 49 {
54 .ctl_name = NET_CORE_DEV_WEIGHT,
55 .procname = "dev_weight", 50 .procname = "dev_weight",
56 .data = &weight_p, 51 .data = &weight_p,
57 .maxlen = sizeof(int), 52 .maxlen = sizeof(int),
@@ -59,7 +54,6 @@ static struct ctl_table net_core_table[] = {
59 .proc_handler = proc_dointvec 54 .proc_handler = proc_dointvec
60 }, 55 },
61 { 56 {
62 .ctl_name = NET_CORE_MAX_BACKLOG,
63 .procname = "netdev_max_backlog", 57 .procname = "netdev_max_backlog",
64 .data = &netdev_max_backlog, 58 .data = &netdev_max_backlog,
65 .maxlen = sizeof(int), 59 .maxlen = sizeof(int),
@@ -67,16 +61,13 @@ static struct ctl_table net_core_table[] = {
67 .proc_handler = proc_dointvec 61 .proc_handler = proc_dointvec
68 }, 62 },
69 { 63 {
70 .ctl_name = NET_CORE_MSG_COST,
71 .procname = "message_cost", 64 .procname = "message_cost",
72 .data = &net_ratelimit_state.interval, 65 .data = &net_ratelimit_state.interval,
73 .maxlen = sizeof(int), 66 .maxlen = sizeof(int),
74 .mode = 0644, 67 .mode = 0644,
75 .proc_handler = proc_dointvec_jiffies, 68 .proc_handler = proc_dointvec_jiffies,
76 .strategy = sysctl_jiffies,
77 }, 69 },
78 { 70 {
79 .ctl_name = NET_CORE_MSG_BURST,
80 .procname = "message_burst", 71 .procname = "message_burst",
81 .data = &net_ratelimit_state.burst, 72 .data = &net_ratelimit_state.burst,
82 .maxlen = sizeof(int), 73 .maxlen = sizeof(int),
@@ -84,7 +75,6 @@ static struct ctl_table net_core_table[] = {
84 .proc_handler = proc_dointvec, 75 .proc_handler = proc_dointvec,
85 }, 76 },
86 { 77 {
87 .ctl_name = NET_CORE_OPTMEM_MAX,
88 .procname = "optmem_max", 78 .procname = "optmem_max",
89 .data = &sysctl_optmem_max, 79 .data = &sysctl_optmem_max,
90 .maxlen = sizeof(int), 80 .maxlen = sizeof(int),
@@ -93,7 +83,6 @@ static struct ctl_table net_core_table[] = {
93 }, 83 },
94#endif /* CONFIG_NET */ 84#endif /* CONFIG_NET */
95 { 85 {
96 .ctl_name = NET_CORE_BUDGET,
97 .procname = "netdev_budget", 86 .procname = "netdev_budget",
98 .data = &netdev_budget, 87 .data = &netdev_budget,
99 .maxlen = sizeof(int), 88 .maxlen = sizeof(int),
@@ -101,31 +90,29 @@ static struct ctl_table net_core_table[] = {
101 .proc_handler = proc_dointvec 90 .proc_handler = proc_dointvec
102 }, 91 },
103 { 92 {
104 .ctl_name = NET_CORE_WARNINGS,
105 .procname = "warnings", 93 .procname = "warnings",
106 .data = &net_msg_warn, 94 .data = &net_msg_warn,
107 .maxlen = sizeof(int), 95 .maxlen = sizeof(int),
108 .mode = 0644, 96 .mode = 0644,
109 .proc_handler = proc_dointvec 97 .proc_handler = proc_dointvec
110 }, 98 },
111 { .ctl_name = 0 } 99 { }
112}; 100};
113 101
114static struct ctl_table netns_core_table[] = { 102static struct ctl_table netns_core_table[] = {
115 { 103 {
116 .ctl_name = NET_CORE_SOMAXCONN,
117 .procname = "somaxconn", 104 .procname = "somaxconn",
118 .data = &init_net.core.sysctl_somaxconn, 105 .data = &init_net.core.sysctl_somaxconn,
119 .maxlen = sizeof(int), 106 .maxlen = sizeof(int),
120 .mode = 0644, 107 .mode = 0644,
121 .proc_handler = proc_dointvec 108 .proc_handler = proc_dointvec
122 }, 109 },
123 { .ctl_name = 0 } 110 { }
124}; 111};
125 112
126__net_initdata struct ctl_path net_core_path[] = { 113__net_initdata struct ctl_path net_core_path[] = {
127 { .procname = "net", .ctl_name = CTL_NET, }, 114 { .procname = "net", },
128 { .procname = "core", .ctl_name = NET_CORE, }, 115 { .procname = "core", },
129 { }, 116 { },
130}; 117};
131 118
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c
index a5a1856234e7..563943822e58 100644
--- a/net/dccp/sysctl.c
+++ b/net/dccp/sysctl.c
@@ -93,13 +93,13 @@ static struct ctl_table dccp_default_table[] = {
93 .proc_handler = proc_dointvec_ms_jiffies, 93 .proc_handler = proc_dointvec_ms_jiffies,
94 }, 94 },
95 95
96 { .ctl_name = 0, } 96 { }
97}; 97};
98 98
99static struct ctl_path dccp_path[] = { 99static struct ctl_path dccp_path[] = {
100 { .procname = "net", .ctl_name = CTL_NET, }, 100 { .procname = "net", },
101 { .procname = "dccp", .ctl_name = NET_DCCP, }, 101 { .procname = "dccp", },
102 { .procname = "default", .ctl_name = NET_DCCP_DEFAULT, }, 102 { .procname = "default", },
103 { } 103 { }
104}; 104};
105 105
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index f20dec9cfa06..238af093495b 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -89,7 +89,6 @@ static struct dn_dev_parms dn_dev_list[] = {
89 .t2 = 1, 89 .t2 = 1,
90 .t3 = 10, 90 .t3 = 10,
91 .name = "ethernet", 91 .name = "ethernet",
92 .ctl_name = NET_DECNET_CONF_ETHER,
93 .up = dn_eth_up, 92 .up = dn_eth_up,
94 .down = dn_eth_down, 93 .down = dn_eth_down,
95 .timer3 = dn_send_brd_hello, 94 .timer3 = dn_send_brd_hello,
@@ -101,7 +100,6 @@ static struct dn_dev_parms dn_dev_list[] = {
101 .t2 = 1, 100 .t2 = 1,
102 .t3 = 10, 101 .t3 = 10,
103 .name = "ipgre", 102 .name = "ipgre",
104 .ctl_name = NET_DECNET_CONF_GRE,
105 .timer3 = dn_send_brd_hello, 103 .timer3 = dn_send_brd_hello,
106}, 104},
107#if 0 105#if 0
@@ -112,7 +110,6 @@ static struct dn_dev_parms dn_dev_list[] = {
112 .t2 = 1, 110 .t2 = 1,
113 .t3 = 120, 111 .t3 = 120,
114 .name = "x25", 112 .name = "x25",
115 .ctl_name = NET_DECNET_CONF_X25,
116 .timer3 = dn_send_ptp_hello, 113 .timer3 = dn_send_ptp_hello,
117}, 114},
118#endif 115#endif
@@ -124,7 +121,6 @@ static struct dn_dev_parms dn_dev_list[] = {
124 .t2 = 1, 121 .t2 = 1,
125 .t3 = 10, 122 .t3 = 10,
126 .name = "ppp", 123 .name = "ppp",
127 .ctl_name = NET_DECNET_CONF_PPP,
128 .timer3 = dn_send_brd_hello, 124 .timer3 = dn_send_brd_hello,
129}, 125},
130#endif 126#endif
@@ -135,7 +131,6 @@ static struct dn_dev_parms dn_dev_list[] = {
135 .t2 = 1, 131 .t2 = 1,
136 .t3 = 120, 132 .t3 = 120,
137 .name = "ddcmp", 133 .name = "ddcmp",
138 .ctl_name = NET_DECNET_CONF_DDCMP,
139 .timer3 = dn_send_ptp_hello, 134 .timer3 = dn_send_ptp_hello,
140}, 135},
141{ 136{
@@ -145,7 +140,6 @@ static struct dn_dev_parms dn_dev_list[] = {
145 .t2 = 1, 140 .t2 = 1,
146 .t3 = 10, 141 .t3 = 10,
147 .name = "loopback", 142 .name = "loopback",
148 .ctl_name = NET_DECNET_CONF_LOOPBACK,
149 .timer3 = dn_send_brd_hello, 143 .timer3 = dn_send_brd_hello,
150} 144}
151}; 145};
@@ -166,10 +160,6 @@ static int max_priority[] = { 127 }; /* From DECnet spec */
166 160
167static int dn_forwarding_proc(ctl_table *, int, 161static int dn_forwarding_proc(ctl_table *, int,
168 void __user *, size_t *, loff_t *); 162 void __user *, size_t *, loff_t *);
169static int dn_forwarding_sysctl(ctl_table *table,
170 void __user *oldval, size_t __user *oldlenp,
171 void __user *newval, size_t newlen);
172
173static struct dn_dev_sysctl_table { 163static struct dn_dev_sysctl_table {
174 struct ctl_table_header *sysctl_header; 164 struct ctl_table_header *sysctl_header;
175 ctl_table dn_dev_vars[5]; 165 ctl_table dn_dev_vars[5];
@@ -177,44 +167,36 @@ static struct dn_dev_sysctl_table {
177 NULL, 167 NULL,
178 { 168 {
179 { 169 {
180 .ctl_name = NET_DECNET_CONF_DEV_FORWARDING,
181 .procname = "forwarding", 170 .procname = "forwarding",
182 .data = (void *)DN_DEV_PARMS_OFFSET(forwarding), 171 .data = (void *)DN_DEV_PARMS_OFFSET(forwarding),
183 .maxlen = sizeof(int), 172 .maxlen = sizeof(int),
184 .mode = 0644, 173 .mode = 0644,
185 .proc_handler = dn_forwarding_proc, 174 .proc_handler = dn_forwarding_proc,
186 .strategy = dn_forwarding_sysctl,
187 }, 175 },
188 { 176 {
189 .ctl_name = NET_DECNET_CONF_DEV_PRIORITY,
190 .procname = "priority", 177 .procname = "priority",
191 .data = (void *)DN_DEV_PARMS_OFFSET(priority), 178 .data = (void *)DN_DEV_PARMS_OFFSET(priority),
192 .maxlen = sizeof(int), 179 .maxlen = sizeof(int),
193 .mode = 0644, 180 .mode = 0644,
194 .proc_handler = proc_dointvec_minmax, 181 .proc_handler = proc_dointvec_minmax,
195 .strategy = sysctl_intvec,
196 .extra1 = &min_priority, 182 .extra1 = &min_priority,
197 .extra2 = &max_priority 183 .extra2 = &max_priority
198 }, 184 },
199 { 185 {
200 .ctl_name = NET_DECNET_CONF_DEV_T2,
201 .procname = "t2", 186 .procname = "t2",
202 .data = (void *)DN_DEV_PARMS_OFFSET(t2), 187 .data = (void *)DN_DEV_PARMS_OFFSET(t2),
203 .maxlen = sizeof(int), 188 .maxlen = sizeof(int),
204 .mode = 0644, 189 .mode = 0644,
205 .proc_handler = proc_dointvec_minmax, 190 .proc_handler = proc_dointvec_minmax,
206 .strategy = sysctl_intvec,
207 .extra1 = &min_t2, 191 .extra1 = &min_t2,
208 .extra2 = &max_t2 192 .extra2 = &max_t2
209 }, 193 },
210 { 194 {
211 .ctl_name = NET_DECNET_CONF_DEV_T3,
212 .procname = "t3", 195 .procname = "t3",
213 .data = (void *)DN_DEV_PARMS_OFFSET(t3), 196 .data = (void *)DN_DEV_PARMS_OFFSET(t3),
214 .maxlen = sizeof(int), 197 .maxlen = sizeof(int),
215 .mode = 0644, 198 .mode = 0644,
216 .proc_handler = proc_dointvec_minmax, 199 .proc_handler = proc_dointvec_minmax,
217 .strategy = sysctl_intvec,
218 .extra1 = &min_t3, 200 .extra1 = &min_t3,
219 .extra2 = &max_t3 201 .extra2 = &max_t3
220 }, 202 },
@@ -230,9 +212,9 @@ static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *
230#define DN_CTL_PATH_DEV 3 212#define DN_CTL_PATH_DEV 3
231 213
232 struct ctl_path dn_ctl_path[] = { 214 struct ctl_path dn_ctl_path[] = {
233 { .procname = "net", .ctl_name = CTL_NET, }, 215 { .procname = "net", },
234 { .procname = "decnet", .ctl_name = NET_DECNET, }, 216 { .procname = "decnet", },
235 { .procname = "conf", .ctl_name = NET_DECNET_CONF, }, 217 { .procname = "conf", },
236 { /* to be set */ }, 218 { /* to be set */ },
237 { }, 219 { },
238 }; 220 };
@@ -248,10 +230,8 @@ static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *
248 230
249 if (dev) { 231 if (dev) {
250 dn_ctl_path[DN_CTL_PATH_DEV].procname = dev->name; 232 dn_ctl_path[DN_CTL_PATH_DEV].procname = dev->name;
251 dn_ctl_path[DN_CTL_PATH_DEV].ctl_name = dev->ifindex;
252 } else { 233 } else {
253 dn_ctl_path[DN_CTL_PATH_DEV].procname = parms->name; 234 dn_ctl_path[DN_CTL_PATH_DEV].procname = parms->name;
254 dn_ctl_path[DN_CTL_PATH_DEV].ctl_name = parms->ctl_name;
255 } 235 }
256 236
257 t->dn_dev_vars[0].extra1 = (void *)dev; 237 t->dn_dev_vars[0].extra1 = (void *)dev;
@@ -317,44 +297,6 @@ static int dn_forwarding_proc(ctl_table *table, int write,
317#endif 297#endif
318} 298}
319 299
320static int dn_forwarding_sysctl(ctl_table *table,
321 void __user *oldval, size_t __user *oldlenp,
322 void __user *newval, size_t newlen)
323{
324#ifdef CONFIG_DECNET_ROUTER
325 struct net_device *dev = table->extra1;
326 struct dn_dev *dn_db;
327 int value;
328
329 if (table->extra1 == NULL)
330 return -EINVAL;
331
332 dn_db = dev->dn_ptr;
333
334 if (newval && newlen) {
335 if (newlen != sizeof(int))
336 return -EINVAL;
337
338 if (get_user(value, (int __user *)newval))
339 return -EFAULT;
340 if (value < 0)
341 return -EINVAL;
342 if (value > 2)
343 return -EINVAL;
344
345 if (dn_db->parms.down)
346 dn_db->parms.down(dev);
347 dn_db->parms.forwarding = value;
348 if (dn_db->parms.up)
349 dn_db->parms.up(dev);
350 }
351
352 return 0;
353#else
354 return -EINVAL;
355#endif
356}
357
358#else /* CONFIG_SYSCTL */ 300#else /* CONFIG_SYSCTL */
359static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms) 301static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms)
360{ 302{
diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c
index 2036568beea9..be3eb8e23288 100644
--- a/net/decnet/sysctl_net_decnet.c
+++ b/net/decnet/sysctl_net_decnet.c
@@ -131,39 +131,6 @@ static int parse_addr(__le16 *addr, char *str)
131 return 0; 131 return 0;
132} 132}
133 133
134
135static int dn_node_address_strategy(ctl_table *table,
136 void __user *oldval, size_t __user *oldlenp,
137 void __user *newval, size_t newlen)
138{
139 size_t len;
140 __le16 addr;
141
142 if (oldval && oldlenp) {
143 if (get_user(len, oldlenp))
144 return -EFAULT;
145 if (len) {
146 if (len != sizeof(unsigned short))
147 return -EINVAL;
148 if (put_user(decnet_address, (__le16 __user *)oldval))
149 return -EFAULT;
150 }
151 }
152 if (newval && newlen) {
153 if (newlen != sizeof(unsigned short))
154 return -EINVAL;
155 if (get_user(addr, (__le16 __user *)newval))
156 return -EFAULT;
157
158 dn_dev_devices_off();
159
160 decnet_address = addr;
161
162 dn_dev_devices_on();
163 }
164 return 0;
165}
166
167static int dn_node_address_handler(ctl_table *table, int write, 134static int dn_node_address_handler(ctl_table *table, int write,
168 void __user *buffer, 135 void __user *buffer,
169 size_t *lenp, loff_t *ppos) 136 size_t *lenp, loff_t *ppos)
@@ -215,64 +182,6 @@ static int dn_node_address_handler(ctl_table *table, int write,
215 return 0; 182 return 0;
216} 183}
217 184
218
219static int dn_def_dev_strategy(ctl_table *table,
220 void __user *oldval, size_t __user *oldlenp,
221 void __user *newval, size_t newlen)
222{
223 size_t len;
224 struct net_device *dev;
225 char devname[17];
226 size_t namel;
227 int rv = 0;
228
229 devname[0] = 0;
230
231 if (oldval && oldlenp) {
232 if (get_user(len, oldlenp))
233 return -EFAULT;
234 if (len) {
235 dev = dn_dev_get_default();
236 if (dev) {
237 strcpy(devname, dev->name);
238 dev_put(dev);
239 }
240
241 namel = strlen(devname) + 1;
242 if (len > namel) len = namel;
243
244 if (copy_to_user(oldval, devname, len))
245 return -EFAULT;
246
247 if (put_user(len, oldlenp))
248 return -EFAULT;
249 }
250 }
251
252 if (newval && newlen) {
253 if (newlen > 16)
254 return -E2BIG;
255
256 if (copy_from_user(devname, newval, newlen))
257 return -EFAULT;
258
259 devname[newlen] = 0;
260
261 dev = dev_get_by_name(&init_net, devname);
262 if (dev == NULL)
263 return -ENODEV;
264
265 rv = -ENODEV;
266 if (dev->dn_ptr != NULL)
267 rv = dn_dev_set_default(dev, 1);
268 if (rv)
269 dev_put(dev);
270 }
271
272 return rv;
273}
274
275
276static int dn_def_dev_handler(ctl_table *table, int write, 185static int dn_def_dev_handler(ctl_table *table, int write,
277 void __user *buffer, 186 void __user *buffer,
278 size_t *lenp, loff_t *ppos) 187 size_t *lenp, loff_t *ppos)
@@ -338,138 +247,112 @@ static int dn_def_dev_handler(ctl_table *table, int write,
338 247
339static ctl_table dn_table[] = { 248static ctl_table dn_table[] = {
340 { 249 {
341 .ctl_name = NET_DECNET_NODE_ADDRESS,
342 .procname = "node_address", 250 .procname = "node_address",
343 .maxlen = 7, 251 .maxlen = 7,
344 .mode = 0644, 252 .mode = 0644,
345 .proc_handler = dn_node_address_handler, 253 .proc_handler = dn_node_address_handler,
346 .strategy = dn_node_address_strategy,
347 }, 254 },
348 { 255 {
349 .ctl_name = NET_DECNET_NODE_NAME,
350 .procname = "node_name", 256 .procname = "node_name",
351 .data = node_name, 257 .data = node_name,
352 .maxlen = 7, 258 .maxlen = 7,
353 .mode = 0644, 259 .mode = 0644,
354 .proc_handler = proc_dostring, 260 .proc_handler = proc_dostring,
355 .strategy = sysctl_string,
356 }, 261 },
357 { 262 {
358 .ctl_name = NET_DECNET_DEFAULT_DEVICE,
359 .procname = "default_device", 263 .procname = "default_device",
360 .maxlen = 16, 264 .maxlen = 16,
361 .mode = 0644, 265 .mode = 0644,
362 .proc_handler = dn_def_dev_handler, 266 .proc_handler = dn_def_dev_handler,
363 .strategy = dn_def_dev_strategy,
364 }, 267 },
365 { 268 {
366 .ctl_name = NET_DECNET_TIME_WAIT,
367 .procname = "time_wait", 269 .procname = "time_wait",
368 .data = &decnet_time_wait, 270 .data = &decnet_time_wait,
369 .maxlen = sizeof(int), 271 .maxlen = sizeof(int),
370 .mode = 0644, 272 .mode = 0644,
371 .proc_handler = proc_dointvec_minmax, 273 .proc_handler = proc_dointvec_minmax,
372 .strategy = sysctl_intvec,
373 .extra1 = &min_decnet_time_wait, 274 .extra1 = &min_decnet_time_wait,
374 .extra2 = &max_decnet_time_wait 275 .extra2 = &max_decnet_time_wait
375 }, 276 },
376 { 277 {
377 .ctl_name = NET_DECNET_DN_COUNT,
378 .procname = "dn_count", 278 .procname = "dn_count",
379 .data = &decnet_dn_count, 279 .data = &decnet_dn_count,
380 .maxlen = sizeof(int), 280 .maxlen = sizeof(int),
381 .mode = 0644, 281 .mode = 0644,
382 .proc_handler = proc_dointvec_minmax, 282 .proc_handler = proc_dointvec_minmax,
383 .strategy = sysctl_intvec,
384 .extra1 = &min_state_count, 283 .extra1 = &min_state_count,
385 .extra2 = &max_state_count 284 .extra2 = &max_state_count
386 }, 285 },
387 { 286 {
388 .ctl_name = NET_DECNET_DI_COUNT,
389 .procname = "di_count", 287 .procname = "di_count",
390 .data = &decnet_di_count, 288 .data = &decnet_di_count,
391 .maxlen = sizeof(int), 289 .maxlen = sizeof(int),
392 .mode = 0644, 290 .mode = 0644,
393 .proc_handler = proc_dointvec_minmax, 291 .proc_handler = proc_dointvec_minmax,
394 .strategy = sysctl_intvec,
395 .extra1 = &min_state_count, 292 .extra1 = &min_state_count,
396 .extra2 = &max_state_count 293 .extra2 = &max_state_count
397 }, 294 },
398 { 295 {
399 .ctl_name = NET_DECNET_DR_COUNT,
400 .procname = "dr_count", 296 .procname = "dr_count",
401 .data = &decnet_dr_count, 297 .data = &decnet_dr_count,
402 .maxlen = sizeof(int), 298 .maxlen = sizeof(int),
403 .mode = 0644, 299 .mode = 0644,
404 .proc_handler = proc_dointvec_minmax, 300 .proc_handler = proc_dointvec_minmax,
405 .strategy = sysctl_intvec,
406 .extra1 = &min_state_count, 301 .extra1 = &min_state_count,
407 .extra2 = &max_state_count 302 .extra2 = &max_state_count
408 }, 303 },
409 { 304 {
410 .ctl_name = NET_DECNET_DST_GC_INTERVAL,
411 .procname = "dst_gc_interval", 305 .procname = "dst_gc_interval",
412 .data = &decnet_dst_gc_interval, 306 .data = &decnet_dst_gc_interval,
413 .maxlen = sizeof(int), 307 .maxlen = sizeof(int),
414 .mode = 0644, 308 .mode = 0644,
415 .proc_handler = proc_dointvec_minmax, 309 .proc_handler = proc_dointvec_minmax,
416 .strategy = sysctl_intvec,
417 .extra1 = &min_decnet_dst_gc_interval, 310 .extra1 = &min_decnet_dst_gc_interval,
418 .extra2 = &max_decnet_dst_gc_interval 311 .extra2 = &max_decnet_dst_gc_interval
419 }, 312 },
420 { 313 {
421 .ctl_name = NET_DECNET_NO_FC_MAX_CWND,
422 .procname = "no_fc_max_cwnd", 314 .procname = "no_fc_max_cwnd",
423 .data = &decnet_no_fc_max_cwnd, 315 .data = &decnet_no_fc_max_cwnd,
424 .maxlen = sizeof(int), 316 .maxlen = sizeof(int),
425 .mode = 0644, 317 .mode = 0644,
426 .proc_handler = proc_dointvec_minmax, 318 .proc_handler = proc_dointvec_minmax,
427 .strategy = sysctl_intvec,
428 .extra1 = &min_decnet_no_fc_max_cwnd, 319 .extra1 = &min_decnet_no_fc_max_cwnd,
429 .extra2 = &max_decnet_no_fc_max_cwnd 320 .extra2 = &max_decnet_no_fc_max_cwnd
430 }, 321 },
431 { 322 {
432 .ctl_name = NET_DECNET_MEM,
433 .procname = "decnet_mem", 323 .procname = "decnet_mem",
434 .data = &sysctl_decnet_mem, 324 .data = &sysctl_decnet_mem,
435 .maxlen = sizeof(sysctl_decnet_mem), 325 .maxlen = sizeof(sysctl_decnet_mem),
436 .mode = 0644, 326 .mode = 0644,
437 .proc_handler = proc_dointvec, 327 .proc_handler = proc_dointvec,
438 .strategy = sysctl_intvec,
439 }, 328 },
440 { 329 {
441 .ctl_name = NET_DECNET_RMEM,
442 .procname = "decnet_rmem", 330 .procname = "decnet_rmem",
443 .data = &sysctl_decnet_rmem, 331 .data = &sysctl_decnet_rmem,
444 .maxlen = sizeof(sysctl_decnet_rmem), 332 .maxlen = sizeof(sysctl_decnet_rmem),
445 .mode = 0644, 333 .mode = 0644,
446 .proc_handler = proc_dointvec, 334 .proc_handler = proc_dointvec,
447 .strategy = sysctl_intvec,
448 }, 335 },
449 { 336 {
450 .ctl_name = NET_DECNET_WMEM,
451 .procname = "decnet_wmem", 337 .procname = "decnet_wmem",
452 .data = &sysctl_decnet_wmem, 338 .data = &sysctl_decnet_wmem,
453 .maxlen = sizeof(sysctl_decnet_wmem), 339 .maxlen = sizeof(sysctl_decnet_wmem),
454 .mode = 0644, 340 .mode = 0644,
455 .proc_handler = proc_dointvec, 341 .proc_handler = proc_dointvec,
456 .strategy = sysctl_intvec,
457 }, 342 },
458 { 343 {
459 .ctl_name = NET_DECNET_DEBUG_LEVEL,
460 .procname = "debug", 344 .procname = "debug",
461 .data = &decnet_debug_level, 345 .data = &decnet_debug_level,
462 .maxlen = sizeof(int), 346 .maxlen = sizeof(int),
463 .mode = 0644, 347 .mode = 0644,
464 .proc_handler = proc_dointvec, 348 .proc_handler = proc_dointvec,
465 .strategy = sysctl_intvec,
466 }, 349 },
467 {0} 350 { }
468}; 351};
469 352
470static struct ctl_path dn_path[] = { 353static struct ctl_path dn_path[] = {
471 { .procname = "net", .ctl_name = CTL_NET, }, 354 { .procname = "net", },
472 { .procname = "decnet", .ctl_name = NET_DECNET, }, 355 { .procname = "decnet", },
473 { } 356 { }
474}; 357};
475 358
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 4e80f336c0cf..c95cd93acf29 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -1240,7 +1240,7 @@ void __init arp_init(void)
1240 arp_proc_init(); 1240 arp_proc_init();
1241#ifdef CONFIG_SYSCTL 1241#ifdef CONFIG_SYSCTL
1242 neigh_sysctl_register(NULL, &arp_tbl.parms, NET_IPV4, 1242 neigh_sysctl_register(NULL, &arp_tbl.parms, NET_IPV4,
1243 NET_IPV4_NEIGH, "ipv4", NULL, NULL); 1243 NET_IPV4_NEIGH, "ipv4", NULL);
1244#endif 1244#endif
1245 register_netdevice_notifier(&arp_netdev_notifier); 1245 register_netdevice_notifier(&arp_netdev_notifier);
1246} 1246}
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index e3126612fcbb..5cdbc102a418 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1311,58 +1311,6 @@ static int devinet_conf_proc(ctl_table *ctl, int write,
1311 return ret; 1311 return ret;
1312} 1312}
1313 1313
1314static int devinet_conf_sysctl(ctl_table *table,
1315 void __user *oldval, size_t __user *oldlenp,
1316 void __user *newval, size_t newlen)
1317{
1318 struct ipv4_devconf *cnf;
1319 struct net *net;
1320 int *valp = table->data;
1321 int new;
1322 int i;
1323
1324 if (!newval || !newlen)
1325 return 0;
1326
1327 if (newlen != sizeof(int))
1328 return -EINVAL;
1329
1330 if (get_user(new, (int __user *)newval))
1331 return -EFAULT;
1332
1333 if (new == *valp)
1334 return 0;
1335
1336 if (oldval && oldlenp) {
1337 size_t len;
1338
1339 if (get_user(len, oldlenp))
1340 return -EFAULT;
1341
1342 if (len) {
1343 if (len > table->maxlen)
1344 len = table->maxlen;
1345 if (copy_to_user(oldval, valp, len))
1346 return -EFAULT;
1347 if (put_user(len, oldlenp))
1348 return -EFAULT;
1349 }
1350 }
1351
1352 *valp = new;
1353
1354 cnf = table->extra1;
1355 net = table->extra2;
1356 i = (int *)table->data - cnf->data;
1357
1358 set_bit(i, cnf->state);
1359
1360 if (cnf == net->ipv4.devconf_dflt)
1361 devinet_copy_dflt_conf(net, i);
1362
1363 return 1;
1364}
1365
1366static int devinet_sysctl_forward(ctl_table *ctl, int write, 1314static int devinet_sysctl_forward(ctl_table *ctl, int write,
1367 void __user *buffer, 1315 void __user *buffer,
1368 size_t *lenp, loff_t *ppos) 1316 size_t *lenp, loff_t *ppos)
@@ -1408,47 +1356,28 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write,
1408 return ret; 1356 return ret;
1409} 1357}
1410 1358
1411int ipv4_doint_and_flush_strategy(ctl_table *table, 1359#define DEVINET_SYSCTL_ENTRY(attr, name, mval, proc) \
1412 void __user *oldval, size_t __user *oldlenp,
1413 void __user *newval, size_t newlen)
1414{
1415 int ret = devinet_conf_sysctl(table, oldval, oldlenp, newval, newlen);
1416 struct net *net = table->extra2;
1417
1418 if (ret == 1)
1419 rt_cache_flush(net, 0);
1420
1421 return ret;
1422}
1423
1424
1425#define DEVINET_SYSCTL_ENTRY(attr, name, mval, proc, sysctl) \
1426 { \ 1360 { \
1427 .ctl_name = NET_IPV4_CONF_ ## attr, \
1428 .procname = name, \ 1361 .procname = name, \
1429 .data = ipv4_devconf.data + \ 1362 .data = ipv4_devconf.data + \
1430 NET_IPV4_CONF_ ## attr - 1, \ 1363 NET_IPV4_CONF_ ## attr - 1, \
1431 .maxlen = sizeof(int), \ 1364 .maxlen = sizeof(int), \
1432 .mode = mval, \ 1365 .mode = mval, \
1433 .proc_handler = proc, \ 1366 .proc_handler = proc, \
1434 .strategy = sysctl, \
1435 .extra1 = &ipv4_devconf, \ 1367 .extra1 = &ipv4_devconf, \
1436 } 1368 }
1437 1369
1438#define DEVINET_SYSCTL_RW_ENTRY(attr, name) \ 1370#define DEVINET_SYSCTL_RW_ENTRY(attr, name) \
1439 DEVINET_SYSCTL_ENTRY(attr, name, 0644, devinet_conf_proc, \ 1371 DEVINET_SYSCTL_ENTRY(attr, name, 0644, devinet_conf_proc)
1440 devinet_conf_sysctl)
1441 1372
1442#define DEVINET_SYSCTL_RO_ENTRY(attr, name) \ 1373#define DEVINET_SYSCTL_RO_ENTRY(attr, name) \
1443 DEVINET_SYSCTL_ENTRY(attr, name, 0444, devinet_conf_proc, \ 1374 DEVINET_SYSCTL_ENTRY(attr, name, 0444, devinet_conf_proc)
1444 devinet_conf_sysctl)
1445 1375
1446#define DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, proc, sysctl) \ 1376#define DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, proc) \
1447 DEVINET_SYSCTL_ENTRY(attr, name, 0644, proc, sysctl) 1377 DEVINET_SYSCTL_ENTRY(attr, name, 0644, proc)
1448 1378
1449#define DEVINET_SYSCTL_FLUSHING_ENTRY(attr, name) \ 1379#define DEVINET_SYSCTL_FLUSHING_ENTRY(attr, name) \
1450 DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, ipv4_doint_and_flush, \ 1380 DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, ipv4_doint_and_flush)
1451 ipv4_doint_and_flush_strategy)
1452 1381
1453static struct devinet_sysctl_table { 1382static struct devinet_sysctl_table {
1454 struct ctl_table_header *sysctl_header; 1383 struct ctl_table_header *sysctl_header;
@@ -1457,8 +1386,7 @@ static struct devinet_sysctl_table {
1457} devinet_sysctl = { 1386} devinet_sysctl = {
1458 .devinet_vars = { 1387 .devinet_vars = {
1459 DEVINET_SYSCTL_COMPLEX_ENTRY(FORWARDING, "forwarding", 1388 DEVINET_SYSCTL_COMPLEX_ENTRY(FORWARDING, "forwarding",
1460 devinet_sysctl_forward, 1389 devinet_sysctl_forward),
1461 devinet_conf_sysctl),
1462 DEVINET_SYSCTL_RO_ENTRY(MC_FORWARDING, "mc_forwarding"), 1390 DEVINET_SYSCTL_RO_ENTRY(MC_FORWARDING, "mc_forwarding"),
1463 1391
1464 DEVINET_SYSCTL_RW_ENTRY(ACCEPT_REDIRECTS, "accept_redirects"), 1392 DEVINET_SYSCTL_RW_ENTRY(ACCEPT_REDIRECTS, "accept_redirects"),
@@ -1490,7 +1418,7 @@ static struct devinet_sysctl_table {
1490}; 1418};
1491 1419
1492static int __devinet_sysctl_register(struct net *net, char *dev_name, 1420static int __devinet_sysctl_register(struct net *net, char *dev_name,
1493 int ctl_name, struct ipv4_devconf *p) 1421 struct ipv4_devconf *p)
1494{ 1422{
1495 int i; 1423 int i;
1496 struct devinet_sysctl_table *t; 1424 struct devinet_sysctl_table *t;
@@ -1498,9 +1426,9 @@ static int __devinet_sysctl_register(struct net *net, char *dev_name,
1498#define DEVINET_CTL_PATH_DEV 3 1426#define DEVINET_CTL_PATH_DEV 3
1499 1427
1500 struct ctl_path devinet_ctl_path[] = { 1428 struct ctl_path devinet_ctl_path[] = {
1501 { .procname = "net", .ctl_name = CTL_NET, }, 1429 { .procname = "net", },
1502 { .procname = "ipv4", .ctl_name = NET_IPV4, }, 1430 { .procname = "ipv4", },
1503 { .procname = "conf", .ctl_name = NET_IPV4_CONF, }, 1431 { .procname = "conf", },
1504 { /* to be set */ }, 1432 { /* to be set */ },
1505 { }, 1433 { },
1506 }; 1434 };
@@ -1525,7 +1453,6 @@ static int __devinet_sysctl_register(struct net *net, char *dev_name,
1525 goto free; 1453 goto free;
1526 1454
1527 devinet_ctl_path[DEVINET_CTL_PATH_DEV].procname = t->dev_name; 1455 devinet_ctl_path[DEVINET_CTL_PATH_DEV].procname = t->dev_name;
1528 devinet_ctl_path[DEVINET_CTL_PATH_DEV].ctl_name = ctl_name;
1529 1456
1530 t->sysctl_header = register_net_sysctl_table(net, devinet_ctl_path, 1457 t->sysctl_header = register_net_sysctl_table(net, devinet_ctl_path,
1531 t->devinet_vars); 1458 t->devinet_vars);
@@ -1559,9 +1486,9 @@ static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf)
1559static void devinet_sysctl_register(struct in_device *idev) 1486static void devinet_sysctl_register(struct in_device *idev)
1560{ 1487{
1561 neigh_sysctl_register(idev->dev, idev->arp_parms, NET_IPV4, 1488 neigh_sysctl_register(idev->dev, idev->arp_parms, NET_IPV4,
1562 NET_IPV4_NEIGH, "ipv4", NULL, NULL); 1489 NET_IPV4_NEIGH, "ipv4", NULL);
1563 __devinet_sysctl_register(dev_net(idev->dev), idev->dev->name, 1490 __devinet_sysctl_register(dev_net(idev->dev), idev->dev->name,
1564 idev->dev->ifindex, &idev->cnf); 1491 &idev->cnf);
1565} 1492}
1566 1493
1567static void devinet_sysctl_unregister(struct in_device *idev) 1494static void devinet_sysctl_unregister(struct in_device *idev)
@@ -1572,14 +1499,12 @@ static void devinet_sysctl_unregister(struct in_device *idev)
1572 1499
1573static struct ctl_table ctl_forward_entry[] = { 1500static struct ctl_table ctl_forward_entry[] = {
1574 { 1501 {
1575 .ctl_name = NET_IPV4_FORWARD,
1576 .procname = "ip_forward", 1502 .procname = "ip_forward",
1577 .data = &ipv4_devconf.data[ 1503 .data = &ipv4_devconf.data[
1578 NET_IPV4_CONF_FORWARDING - 1], 1504 NET_IPV4_CONF_FORWARDING - 1],
1579 .maxlen = sizeof(int), 1505 .maxlen = sizeof(int),
1580 .mode = 0644, 1506 .mode = 0644,
1581 .proc_handler = devinet_sysctl_forward, 1507 .proc_handler = devinet_sysctl_forward,
1582 .strategy = devinet_conf_sysctl,
1583 .extra1 = &ipv4_devconf, 1508 .extra1 = &ipv4_devconf,
1584 .extra2 = &init_net, 1509 .extra2 = &init_net,
1585 }, 1510 },
@@ -1587,8 +1512,8 @@ static struct ctl_table ctl_forward_entry[] = {
1587}; 1512};
1588 1513
1589static __net_initdata struct ctl_path net_ipv4_path[] = { 1514static __net_initdata struct ctl_path net_ipv4_path[] = {
1590 { .procname = "net", .ctl_name = CTL_NET, }, 1515 { .procname = "net", },
1591 { .procname = "ipv4", .ctl_name = NET_IPV4, }, 1516 { .procname = "ipv4", },
1592 { }, 1517 { },
1593}; 1518};
1594#endif 1519#endif
@@ -1627,13 +1552,11 @@ static __net_init int devinet_init_net(struct net *net)
1627 } 1552 }
1628 1553
1629#ifdef CONFIG_SYSCTL 1554#ifdef CONFIG_SYSCTL
1630 err = __devinet_sysctl_register(net, "all", 1555 err = __devinet_sysctl_register(net, "all", all);
1631 NET_PROTO_CONF_ALL, all);
1632 if (err < 0) 1556 if (err < 0)
1633 goto err_reg_all; 1557 goto err_reg_all;
1634 1558
1635 err = __devinet_sysctl_register(net, "default", 1559 err = __devinet_sysctl_register(net, "default", dflt);
1636 NET_PROTO_CONF_DEFAULT, dflt);
1637 if (err < 0) 1560 if (err < 0)
1638 goto err_reg_dflt; 1561 goto err_reg_dflt;
1639 1562
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index c4735310a923..86964b353c31 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -604,7 +604,6 @@ static int zero;
604 604
605static struct ctl_table ip4_frags_ns_ctl_table[] = { 605static struct ctl_table ip4_frags_ns_ctl_table[] = {
606 { 606 {
607 .ctl_name = NET_IPV4_IPFRAG_HIGH_THRESH,
608 .procname = "ipfrag_high_thresh", 607 .procname = "ipfrag_high_thresh",
609 .data = &init_net.ipv4.frags.high_thresh, 608 .data = &init_net.ipv4.frags.high_thresh,
610 .maxlen = sizeof(int), 609 .maxlen = sizeof(int),
@@ -612,7 +611,6 @@ static struct ctl_table ip4_frags_ns_ctl_table[] = {
612 .proc_handler = proc_dointvec 611 .proc_handler = proc_dointvec
613 }, 612 },
614 { 613 {
615 .ctl_name = NET_IPV4_IPFRAG_LOW_THRESH,
616 .procname = "ipfrag_low_thresh", 614 .procname = "ipfrag_low_thresh",
617 .data = &init_net.ipv4.frags.low_thresh, 615 .data = &init_net.ipv4.frags.low_thresh,
618 .maxlen = sizeof(int), 616 .maxlen = sizeof(int),
@@ -620,26 +618,22 @@ static struct ctl_table ip4_frags_ns_ctl_table[] = {
620 .proc_handler = proc_dointvec 618 .proc_handler = proc_dointvec
621 }, 619 },
622 { 620 {
623 .ctl_name = NET_IPV4_IPFRAG_TIME,
624 .procname = "ipfrag_time", 621 .procname = "ipfrag_time",
625 .data = &init_net.ipv4.frags.timeout, 622 .data = &init_net.ipv4.frags.timeout,
626 .maxlen = sizeof(int), 623 .maxlen = sizeof(int),
627 .mode = 0644, 624 .mode = 0644,
628 .proc_handler = proc_dointvec_jiffies, 625 .proc_handler = proc_dointvec_jiffies,
629 .strategy = sysctl_jiffies
630 }, 626 },
631 { } 627 { }
632}; 628};
633 629
634static struct ctl_table ip4_frags_ctl_table[] = { 630static struct ctl_table ip4_frags_ctl_table[] = {
635 { 631 {
636 .ctl_name = NET_IPV4_IPFRAG_SECRET_INTERVAL,
637 .procname = "ipfrag_secret_interval", 632 .procname = "ipfrag_secret_interval",
638 .data = &ip4_frags.secret_interval, 633 .data = &ip4_frags.secret_interval,
639 .maxlen = sizeof(int), 634 .maxlen = sizeof(int),
640 .mode = 0644, 635 .mode = 0644,
641 .proc_handler = proc_dointvec_jiffies, 636 .proc_handler = proc_dointvec_jiffies,
642 .strategy = sysctl_jiffies
643 }, 637 },
644 { 638 {
645 .procname = "ipfrag_max_dist", 639 .procname = "ipfrag_max_dist",
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c
index f53cb8df4182..c14623fc4d5e 100644
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -248,9 +248,9 @@ module_exit(ipv4_netfilter_fini);
248 248
249#ifdef CONFIG_SYSCTL 249#ifdef CONFIG_SYSCTL
250struct ctl_path nf_net_ipv4_netfilter_sysctl_path[] = { 250struct ctl_path nf_net_ipv4_netfilter_sysctl_path[] = {
251 { .procname = "net", .ctl_name = CTL_NET, }, 251 { .procname = "net", },
252 { .procname = "ipv4", .ctl_name = NET_IPV4, }, 252 { .procname = "ipv4", },
253 { .procname = "netfilter", .ctl_name = NET_IPV4_NETFILTER, }, 253 { .procname = "netfilter", },
254 { } 254 { }
255}; 255};
256EXPORT_SYMBOL_GPL(nf_net_ipv4_netfilter_sysctl_path); 256EXPORT_SYMBOL_GPL(nf_net_ipv4_netfilter_sysctl_path);
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index 49ad44712f46..2855f1f38cbc 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -515,14 +515,13 @@ static struct ctl_table_header *ipq_sysctl_header;
515 515
516static ctl_table ipq_table[] = { 516static ctl_table ipq_table[] = {
517 { 517 {
518 .ctl_name = NET_IPQ_QMAX,
519 .procname = NET_IPQ_QMAX_NAME, 518 .procname = NET_IPQ_QMAX_NAME,
520 .data = &queue_maxlen, 519 .data = &queue_maxlen,
521 .maxlen = sizeof(queue_maxlen), 520 .maxlen = sizeof(queue_maxlen),
522 .mode = 0644, 521 .mode = 0644,
523 .proc_handler = proc_dointvec 522 .proc_handler = proc_dointvec
524 }, 523 },
525 { .ctl_name = 0 } 524 { }
526}; 525};
527#endif 526#endif
528 527
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index 9cd423ffafa8..d171b123a656 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -195,7 +195,6 @@ static int log_invalid_proto_max = 255;
195 195
196static ctl_table ip_ct_sysctl_table[] = { 196static ctl_table ip_ct_sysctl_table[] = {
197 { 197 {
198 .ctl_name = NET_IPV4_NF_CONNTRACK_MAX,
199 .procname = "ip_conntrack_max", 198 .procname = "ip_conntrack_max",
200 .data = &nf_conntrack_max, 199 .data = &nf_conntrack_max,
201 .maxlen = sizeof(int), 200 .maxlen = sizeof(int),
@@ -203,7 +202,6 @@ static ctl_table ip_ct_sysctl_table[] = {
203 .proc_handler = proc_dointvec, 202 .proc_handler = proc_dointvec,
204 }, 203 },
205 { 204 {
206 .ctl_name = NET_IPV4_NF_CONNTRACK_COUNT,
207 .procname = "ip_conntrack_count", 205 .procname = "ip_conntrack_count",
208 .data = &init_net.ct.count, 206 .data = &init_net.ct.count,
209 .maxlen = sizeof(int), 207 .maxlen = sizeof(int),
@@ -211,7 +209,6 @@ static ctl_table ip_ct_sysctl_table[] = {
211 .proc_handler = proc_dointvec, 209 .proc_handler = proc_dointvec,
212 }, 210 },
213 { 211 {
214 .ctl_name = NET_IPV4_NF_CONNTRACK_BUCKETS,
215 .procname = "ip_conntrack_buckets", 212 .procname = "ip_conntrack_buckets",
216 .data = &nf_conntrack_htable_size, 213 .data = &nf_conntrack_htable_size,
217 .maxlen = sizeof(unsigned int), 214 .maxlen = sizeof(unsigned int),
@@ -219,7 +216,6 @@ static ctl_table ip_ct_sysctl_table[] = {
219 .proc_handler = proc_dointvec, 216 .proc_handler = proc_dointvec,
220 }, 217 },
221 { 218 {
222 .ctl_name = NET_IPV4_NF_CONNTRACK_CHECKSUM,
223 .procname = "ip_conntrack_checksum", 219 .procname = "ip_conntrack_checksum",
224 .data = &init_net.ct.sysctl_checksum, 220 .data = &init_net.ct.sysctl_checksum,
225 .maxlen = sizeof(int), 221 .maxlen = sizeof(int),
@@ -227,19 +223,15 @@ static ctl_table ip_ct_sysctl_table[] = {
227 .proc_handler = proc_dointvec, 223 .proc_handler = proc_dointvec,
228 }, 224 },
229 { 225 {
230 .ctl_name = NET_IPV4_NF_CONNTRACK_LOG_INVALID,
231 .procname = "ip_conntrack_log_invalid", 226 .procname = "ip_conntrack_log_invalid",
232 .data = &init_net.ct.sysctl_log_invalid, 227 .data = &init_net.ct.sysctl_log_invalid,
233 .maxlen = sizeof(unsigned int), 228 .maxlen = sizeof(unsigned int),
234 .mode = 0644, 229 .mode = 0644,
235 .proc_handler = proc_dointvec_minmax, 230 .proc_handler = proc_dointvec_minmax,
236 .strategy = sysctl_intvec,
237 .extra1 = &log_invalid_proto_min, 231 .extra1 = &log_invalid_proto_min,
238 .extra2 = &log_invalid_proto_max, 232 .extra2 = &log_invalid_proto_max,
239 }, 233 },
240 { 234 { }
241 .ctl_name = 0
242 }
243}; 235};
244#endif /* CONFIG_SYSCTL && CONFIG_NF_CONNTRACK_PROC_COMPAT */ 236#endif /* CONFIG_SYSCTL && CONFIG_NF_CONNTRACK_PROC_COMPAT */
245 237
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c
index e3dd93623df8..7afd39b5b781 100644
--- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c
+++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c
@@ -270,9 +270,7 @@ static struct ctl_table icmp_sysctl_table[] = {
270 .mode = 0644, 270 .mode = 0644,
271 .proc_handler = proc_dointvec_jiffies, 271 .proc_handler = proc_dointvec_jiffies,
272 }, 272 },
273 { 273 { }
274 .ctl_name = 0
275 }
276}; 274};
277#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT 275#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
278static struct ctl_table icmp_compat_sysctl_table[] = { 276static struct ctl_table icmp_compat_sysctl_table[] = {
@@ -283,9 +281,7 @@ static struct ctl_table icmp_compat_sysctl_table[] = {
283 .mode = 0644, 281 .mode = 0644,
284 .proc_handler = proc_dointvec_jiffies, 282 .proc_handler = proc_dointvec_jiffies,
285 }, 283 },
286 { 284 { }
287 .ctl_name = 0
288 }
289}; 285};
290#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ 286#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */
291#endif /* CONFIG_SYSCTL */ 287#endif /* CONFIG_SYSCTL */
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 90cdcfc32937..e446496f564f 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3058,23 +3058,6 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write,
3058 return -EINVAL; 3058 return -EINVAL;
3059} 3059}
3060 3060
3061static int ipv4_sysctl_rtcache_flush_strategy(ctl_table *table,
3062 void __user *oldval,
3063 size_t __user *oldlenp,
3064 void __user *newval,
3065 size_t newlen)
3066{
3067 int delay;
3068 struct net *net;
3069 if (newlen != sizeof(int))
3070 return -EINVAL;
3071 if (get_user(delay, (int __user *)newval))
3072 return -EFAULT;
3073 net = (struct net *)table->extra1;
3074 rt_cache_flush(net, delay);
3075 return 0;
3076}
3077
3078static void rt_secret_reschedule(int old) 3061static void rt_secret_reschedule(int old)
3079{ 3062{
3080 struct net *net; 3063 struct net *net;
@@ -3119,23 +3102,8 @@ static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write,
3119 return ret; 3102 return ret;
3120} 3103}
3121 3104
3122static int ipv4_sysctl_rt_secret_interval_strategy(ctl_table *table,
3123 void __user *oldval,
3124 size_t __user *oldlenp,
3125 void __user *newval,
3126 size_t newlen)
3127{
3128 int old = ip_rt_secret_interval;
3129 int ret = sysctl_jiffies(table, oldval, oldlenp, newval, newlen);
3130
3131 rt_secret_reschedule(old);
3132
3133 return ret;
3134}
3135
3136static ctl_table ipv4_route_table[] = { 3105static ctl_table ipv4_route_table[] = {
3137 { 3106 {
3138 .ctl_name = NET_IPV4_ROUTE_GC_THRESH,
3139 .procname = "gc_thresh", 3107 .procname = "gc_thresh",
3140 .data = &ipv4_dst_ops.gc_thresh, 3108 .data = &ipv4_dst_ops.gc_thresh,
3141 .maxlen = sizeof(int), 3109 .maxlen = sizeof(int),
@@ -3143,7 +3111,6 @@ static ctl_table ipv4_route_table[] = {
3143 .proc_handler = proc_dointvec, 3111 .proc_handler = proc_dointvec,
3144 }, 3112 },
3145 { 3113 {
3146 .ctl_name = NET_IPV4_ROUTE_MAX_SIZE,
3147 .procname = "max_size", 3114 .procname = "max_size",
3148 .data = &ip_rt_max_size, 3115 .data = &ip_rt_max_size,
3149 .maxlen = sizeof(int), 3116 .maxlen = sizeof(int),
@@ -3153,43 +3120,34 @@ static ctl_table ipv4_route_table[] = {
3153 { 3120 {
3154 /* Deprecated. Use gc_min_interval_ms */ 3121 /* Deprecated. Use gc_min_interval_ms */
3155 3122
3156 .ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL,
3157 .procname = "gc_min_interval", 3123 .procname = "gc_min_interval",
3158 .data = &ip_rt_gc_min_interval, 3124 .data = &ip_rt_gc_min_interval,
3159 .maxlen = sizeof(int), 3125 .maxlen = sizeof(int),
3160 .mode = 0644, 3126 .mode = 0644,
3161 .proc_handler = proc_dointvec_jiffies, 3127 .proc_handler = proc_dointvec_jiffies,
3162 .strategy = sysctl_jiffies,
3163 }, 3128 },
3164 { 3129 {
3165 .ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS,
3166 .procname = "gc_min_interval_ms", 3130 .procname = "gc_min_interval_ms",
3167 .data = &ip_rt_gc_min_interval, 3131 .data = &ip_rt_gc_min_interval,
3168 .maxlen = sizeof(int), 3132 .maxlen = sizeof(int),
3169 .mode = 0644, 3133 .mode = 0644,
3170 .proc_handler = proc_dointvec_ms_jiffies, 3134 .proc_handler = proc_dointvec_ms_jiffies,
3171 .strategy = sysctl_ms_jiffies,
3172 }, 3135 },
3173 { 3136 {
3174 .ctl_name = NET_IPV4_ROUTE_GC_TIMEOUT,
3175 .procname = "gc_timeout", 3137 .procname = "gc_timeout",
3176 .data = &ip_rt_gc_timeout, 3138 .data = &ip_rt_gc_timeout,
3177 .maxlen = sizeof(int), 3139 .maxlen = sizeof(int),
3178 .mode = 0644, 3140 .mode = 0644,
3179 .proc_handler = proc_dointvec_jiffies, 3141 .proc_handler = proc_dointvec_jiffies,
3180 .strategy = sysctl_jiffies,
3181 }, 3142 },
3182 { 3143 {
3183 .ctl_name = NET_IPV4_ROUTE_GC_INTERVAL,
3184 .procname = "gc_interval", 3144 .procname = "gc_interval",
3185 .data = &ip_rt_gc_interval, 3145 .data = &ip_rt_gc_interval,
3186 .maxlen = sizeof(int), 3146 .maxlen = sizeof(int),
3187 .mode = 0644, 3147 .mode = 0644,
3188 .proc_handler = proc_dointvec_jiffies, 3148 .proc_handler = proc_dointvec_jiffies,
3189 .strategy = sysctl_jiffies,
3190 }, 3149 },
3191 { 3150 {
3192 .ctl_name = NET_IPV4_ROUTE_REDIRECT_LOAD,
3193 .procname = "redirect_load", 3151 .procname = "redirect_load",
3194 .data = &ip_rt_redirect_load, 3152 .data = &ip_rt_redirect_load,
3195 .maxlen = sizeof(int), 3153 .maxlen = sizeof(int),
@@ -3197,7 +3155,6 @@ static ctl_table ipv4_route_table[] = {
3197 .proc_handler = proc_dointvec, 3155 .proc_handler = proc_dointvec,
3198 }, 3156 },
3199 { 3157 {
3200 .ctl_name = NET_IPV4_ROUTE_REDIRECT_NUMBER,
3201 .procname = "redirect_number", 3158 .procname = "redirect_number",
3202 .data = &ip_rt_redirect_number, 3159 .data = &ip_rt_redirect_number,
3203 .maxlen = sizeof(int), 3160 .maxlen = sizeof(int),
@@ -3205,7 +3162,6 @@ static ctl_table ipv4_route_table[] = {
3205 .proc_handler = proc_dointvec, 3162 .proc_handler = proc_dointvec,
3206 }, 3163 },
3207 { 3164 {
3208 .ctl_name = NET_IPV4_ROUTE_REDIRECT_SILENCE,
3209 .procname = "redirect_silence", 3165 .procname = "redirect_silence",
3210 .data = &ip_rt_redirect_silence, 3166 .data = &ip_rt_redirect_silence,
3211 .maxlen = sizeof(int), 3167 .maxlen = sizeof(int),
@@ -3213,7 +3169,6 @@ static ctl_table ipv4_route_table[] = {
3213 .proc_handler = proc_dointvec, 3169 .proc_handler = proc_dointvec,
3214 }, 3170 },
3215 { 3171 {
3216 .ctl_name = NET_IPV4_ROUTE_ERROR_COST,
3217 .procname = "error_cost", 3172 .procname = "error_cost",
3218 .data = &ip_rt_error_cost, 3173 .data = &ip_rt_error_cost,
3219 .maxlen = sizeof(int), 3174 .maxlen = sizeof(int),
@@ -3221,7 +3176,6 @@ static ctl_table ipv4_route_table[] = {
3221 .proc_handler = proc_dointvec, 3176 .proc_handler = proc_dointvec,
3222 }, 3177 },
3223 { 3178 {
3224 .ctl_name = NET_IPV4_ROUTE_ERROR_BURST,
3225 .procname = "error_burst", 3179 .procname = "error_burst",
3226 .data = &ip_rt_error_burst, 3180 .data = &ip_rt_error_burst,
3227 .maxlen = sizeof(int), 3181 .maxlen = sizeof(int),
@@ -3229,7 +3183,6 @@ static ctl_table ipv4_route_table[] = {
3229 .proc_handler = proc_dointvec, 3183 .proc_handler = proc_dointvec,
3230 }, 3184 },
3231 { 3185 {
3232 .ctl_name = NET_IPV4_ROUTE_GC_ELASTICITY,
3233 .procname = "gc_elasticity", 3186 .procname = "gc_elasticity",
3234 .data = &ip_rt_gc_elasticity, 3187 .data = &ip_rt_gc_elasticity,
3235 .maxlen = sizeof(int), 3188 .maxlen = sizeof(int),
@@ -3237,16 +3190,13 @@ static ctl_table ipv4_route_table[] = {
3237 .proc_handler = proc_dointvec, 3190 .proc_handler = proc_dointvec,
3238 }, 3191 },
3239 { 3192 {
3240 .ctl_name = NET_IPV4_ROUTE_MTU_EXPIRES,
3241 .procname = "mtu_expires", 3193 .procname = "mtu_expires",
3242 .data = &ip_rt_mtu_expires, 3194 .data = &ip_rt_mtu_expires,
3243 .maxlen = sizeof(int), 3195 .maxlen = sizeof(int),
3244 .mode = 0644, 3196 .mode = 0644,
3245 .proc_handler = proc_dointvec_jiffies, 3197 .proc_handler = proc_dointvec_jiffies,
3246 .strategy = sysctl_jiffies,
3247 }, 3198 },
3248 { 3199 {
3249 .ctl_name = NET_IPV4_ROUTE_MIN_PMTU,
3250 .procname = "min_pmtu", 3200 .procname = "min_pmtu",
3251 .data = &ip_rt_min_pmtu, 3201 .data = &ip_rt_min_pmtu,
3252 .maxlen = sizeof(int), 3202 .maxlen = sizeof(int),
@@ -3254,7 +3204,6 @@ static ctl_table ipv4_route_table[] = {
3254 .proc_handler = proc_dointvec, 3204 .proc_handler = proc_dointvec,
3255 }, 3205 },
3256 { 3206 {
3257 .ctl_name = NET_IPV4_ROUTE_MIN_ADVMSS,
3258 .procname = "min_adv_mss", 3207 .procname = "min_adv_mss",
3259 .data = &ip_rt_min_advmss, 3208 .data = &ip_rt_min_advmss,
3260 .maxlen = sizeof(int), 3209 .maxlen = sizeof(int),
@@ -3262,50 +3211,46 @@ static ctl_table ipv4_route_table[] = {
3262 .proc_handler = proc_dointvec, 3211 .proc_handler = proc_dointvec,
3263 }, 3212 },
3264 { 3213 {
3265 .ctl_name = NET_IPV4_ROUTE_SECRET_INTERVAL,
3266 .procname = "secret_interval", 3214 .procname = "secret_interval",
3267 .data = &ip_rt_secret_interval, 3215 .data = &ip_rt_secret_interval,
3268 .maxlen = sizeof(int), 3216 .maxlen = sizeof(int),
3269 .mode = 0644, 3217 .mode = 0644,
3270 .proc_handler = ipv4_sysctl_rt_secret_interval, 3218 .proc_handler = ipv4_sysctl_rt_secret_interval,
3271 .strategy = ipv4_sysctl_rt_secret_interval_strategy,
3272 }, 3219 },
3273 { .ctl_name = 0 } 3220 { }
3274}; 3221};
3275 3222
3276static struct ctl_table empty[1]; 3223static struct ctl_table empty[1];
3277 3224
3278static struct ctl_table ipv4_skeleton[] = 3225static struct ctl_table ipv4_skeleton[] =
3279{ 3226{
3280 { .procname = "route", .ctl_name = NET_IPV4_ROUTE, 3227 { .procname = "route",
3281 .mode = 0555, .child = ipv4_route_table}, 3228 .mode = 0555, .child = ipv4_route_table},
3282 { .procname = "neigh", .ctl_name = NET_IPV4_NEIGH, 3229 { .procname = "neigh",
3283 .mode = 0555, .child = empty}, 3230 .mode = 0555, .child = empty},
3284 { } 3231 { }
3285}; 3232};
3286 3233
3287static __net_initdata struct ctl_path ipv4_path[] = { 3234static __net_initdata struct ctl_path ipv4_path[] = {
3288 { .procname = "net", .ctl_name = CTL_NET, }, 3235 { .procname = "net", },
3289 { .procname = "ipv4", .ctl_name = NET_IPV4, }, 3236 { .procname = "ipv4", },
3290 { }, 3237 { },
3291}; 3238};
3292 3239
3293static struct ctl_table ipv4_route_flush_table[] = { 3240static struct ctl_table ipv4_route_flush_table[] = {
3294 { 3241 {
3295 .ctl_name = NET_IPV4_ROUTE_FLUSH,
3296 .procname = "flush", 3242 .procname = "flush",
3297 .maxlen = sizeof(int), 3243 .maxlen = sizeof(int),
3298 .mode = 0200, 3244 .mode = 0200,
3299 .proc_handler = ipv4_sysctl_rtcache_flush, 3245 .proc_handler = ipv4_sysctl_rtcache_flush,
3300 .strategy = ipv4_sysctl_rtcache_flush_strategy,
3301 }, 3246 },
3302 { .ctl_name = 0 }, 3247 { },
3303}; 3248};
3304 3249
3305static __net_initdata struct ctl_path ipv4_route_path[] = { 3250static __net_initdata struct ctl_path ipv4_route_path[] = {
3306 { .procname = "net", .ctl_name = CTL_NET, }, 3251 { .procname = "net", },
3307 { .procname = "ipv4", .ctl_name = NET_IPV4, }, 3252 { .procname = "ipv4", },
3308 { .procname = "route", .ctl_name = NET_IPV4_ROUTE, }, 3253 { .procname = "route", },
3309 { }, 3254 { },
3310}; 3255};
3311 3256
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 13f7ab6ad6a0..7e3712ce3994 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -63,34 +63,6 @@ static int ipv4_local_port_range(ctl_table *table, int write,
63 return ret; 63 return ret;
64} 64}
65 65
66/* Validate changes from sysctl interface. */
67static int ipv4_sysctl_local_port_range(ctl_table *table,
68 void __user *oldval,
69 size_t __user *oldlenp,
70 void __user *newval, size_t newlen)
71{
72 int ret;
73 int range[2];
74 ctl_table tmp = {
75 .data = &range,
76 .maxlen = sizeof(range),
77 .mode = table->mode,
78 .extra1 = &ip_local_port_range_min,
79 .extra2 = &ip_local_port_range_max,
80 };
81
82 inet_get_local_port_range(range, range + 1);
83 ret = sysctl_intvec(&tmp, oldval, oldlenp, newval, newlen);
84 if (ret == 0 && newval && newlen) {
85 if (range[1] < range[0])
86 ret = -EINVAL;
87 else
88 set_local_port_range(range);
89 }
90 return ret;
91}
92
93
94static int proc_tcp_congestion_control(ctl_table *ctl, int write, 66static int proc_tcp_congestion_control(ctl_table *ctl, int write,
95 void __user *buffer, size_t *lenp, loff_t *ppos) 67 void __user *buffer, size_t *lenp, loff_t *ppos)
96{ 68{
@@ -109,25 +81,6 @@ static int proc_tcp_congestion_control(ctl_table *ctl, int write,
109 return ret; 81 return ret;
110} 82}
111 83
112static int sysctl_tcp_congestion_control(ctl_table *table,
113 void __user *oldval,
114 size_t __user *oldlenp,
115 void __user *newval, size_t newlen)
116{
117 char val[TCP_CA_NAME_MAX];
118 ctl_table tbl = {
119 .data = val,
120 .maxlen = TCP_CA_NAME_MAX,
121 };
122 int ret;
123
124 tcp_get_default_congestion_control(val);
125 ret = sysctl_string(&tbl, oldval, oldlenp, newval, newlen);
126 if (ret == 1 && newval && newlen)
127 ret = tcp_set_default_congestion_control(val);
128 return ret;
129}
130
131static int proc_tcp_available_congestion_control(ctl_table *ctl, 84static int proc_tcp_available_congestion_control(ctl_table *ctl,
132 int write, 85 int write,
133 void __user *buffer, size_t *lenp, 86 void __user *buffer, size_t *lenp,
@@ -165,32 +118,8 @@ static int proc_allowed_congestion_control(ctl_table *ctl,
165 return ret; 118 return ret;
166} 119}
167 120
168static int strategy_allowed_congestion_control(ctl_table *table,
169 void __user *oldval,
170 size_t __user *oldlenp,
171 void __user *newval,
172 size_t newlen)
173{
174 ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX };
175 int ret;
176
177 tbl.data = kmalloc(tbl.maxlen, GFP_USER);
178 if (!tbl.data)
179 return -ENOMEM;
180
181 tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
182 ret = sysctl_string(&tbl, oldval, oldlenp, newval, newlen);
183 if (ret == 1 && newval && newlen)
184 ret = tcp_set_allowed_congestion_control(tbl.data);
185 kfree(tbl.data);
186
187 return ret;
188
189}
190
191static struct ctl_table ipv4_table[] = { 121static struct ctl_table ipv4_table[] = {
192 { 122 {
193 .ctl_name = NET_IPV4_TCP_TIMESTAMPS,
194 .procname = "tcp_timestamps", 123 .procname = "tcp_timestamps",
195 .data = &sysctl_tcp_timestamps, 124 .data = &sysctl_tcp_timestamps,
196 .maxlen = sizeof(int), 125 .maxlen = sizeof(int),
@@ -198,7 +127,6 @@ static struct ctl_table ipv4_table[] = {
198 .proc_handler = proc_dointvec 127 .proc_handler = proc_dointvec
199 }, 128 },
200 { 129 {
201 .ctl_name = NET_IPV4_TCP_WINDOW_SCALING,
202 .procname = "tcp_window_scaling", 130 .procname = "tcp_window_scaling",
203 .data = &sysctl_tcp_window_scaling, 131 .data = &sysctl_tcp_window_scaling,
204 .maxlen = sizeof(int), 132 .maxlen = sizeof(int),
@@ -206,7 +134,6 @@ static struct ctl_table ipv4_table[] = {
206 .proc_handler = proc_dointvec 134 .proc_handler = proc_dointvec
207 }, 135 },
208 { 136 {
209 .ctl_name = NET_IPV4_TCP_SACK,
210 .procname = "tcp_sack", 137 .procname = "tcp_sack",
211 .data = &sysctl_tcp_sack, 138 .data = &sysctl_tcp_sack,
212 .maxlen = sizeof(int), 139 .maxlen = sizeof(int),
@@ -214,7 +141,6 @@ static struct ctl_table ipv4_table[] = {
214 .proc_handler = proc_dointvec 141 .proc_handler = proc_dointvec
215 }, 142 },
216 { 143 {
217 .ctl_name = NET_IPV4_TCP_RETRANS_COLLAPSE,
218 .procname = "tcp_retrans_collapse", 144 .procname = "tcp_retrans_collapse",
219 .data = &sysctl_tcp_retrans_collapse, 145 .data = &sysctl_tcp_retrans_collapse,
220 .maxlen = sizeof(int), 146 .maxlen = sizeof(int),
@@ -222,17 +148,14 @@ static struct ctl_table ipv4_table[] = {
222 .proc_handler = proc_dointvec 148 .proc_handler = proc_dointvec
223 }, 149 },
224 { 150 {
225 .ctl_name = NET_IPV4_DEFAULT_TTL,
226 .procname = "ip_default_ttl", 151 .procname = "ip_default_ttl",
227 .data = &sysctl_ip_default_ttl, 152 .data = &sysctl_ip_default_ttl,
228 .maxlen = sizeof(int), 153 .maxlen = sizeof(int),
229 .mode = 0644, 154 .mode = 0644,
230 .proc_handler = ipv4_doint_and_flush, 155 .proc_handler = ipv4_doint_and_flush,
231 .strategy = ipv4_doint_and_flush_strategy,
232 .extra2 = &init_net, 156 .extra2 = &init_net,
233 }, 157 },
234 { 158 {
235 .ctl_name = NET_IPV4_NO_PMTU_DISC,
236 .procname = "ip_no_pmtu_disc", 159 .procname = "ip_no_pmtu_disc",
237 .data = &ipv4_config.no_pmtu_disc, 160 .data = &ipv4_config.no_pmtu_disc,
238 .maxlen = sizeof(int), 161 .maxlen = sizeof(int),
@@ -240,7 +163,6 @@ static struct ctl_table ipv4_table[] = {
240 .proc_handler = proc_dointvec 163 .proc_handler = proc_dointvec
241 }, 164 },
242 { 165 {
243 .ctl_name = NET_IPV4_NONLOCAL_BIND,
244 .procname = "ip_nonlocal_bind", 166 .procname = "ip_nonlocal_bind",
245 .data = &sysctl_ip_nonlocal_bind, 167 .data = &sysctl_ip_nonlocal_bind,
246 .maxlen = sizeof(int), 168 .maxlen = sizeof(int),
@@ -248,7 +170,6 @@ static struct ctl_table ipv4_table[] = {
248 .proc_handler = proc_dointvec 170 .proc_handler = proc_dointvec
249 }, 171 },
250 { 172 {
251 .ctl_name = NET_IPV4_TCP_SYN_RETRIES,
252 .procname = "tcp_syn_retries", 173 .procname = "tcp_syn_retries",
253 .data = &sysctl_tcp_syn_retries, 174 .data = &sysctl_tcp_syn_retries,
254 .maxlen = sizeof(int), 175 .maxlen = sizeof(int),
@@ -256,7 +177,6 @@ static struct ctl_table ipv4_table[] = {
256 .proc_handler = proc_dointvec 177 .proc_handler = proc_dointvec
257 }, 178 },
258 { 179 {
259 .ctl_name = NET_TCP_SYNACK_RETRIES,
260 .procname = "tcp_synack_retries", 180 .procname = "tcp_synack_retries",
261 .data = &sysctl_tcp_synack_retries, 181 .data = &sysctl_tcp_synack_retries,
262 .maxlen = sizeof(int), 182 .maxlen = sizeof(int),
@@ -264,7 +184,6 @@ static struct ctl_table ipv4_table[] = {
264 .proc_handler = proc_dointvec 184 .proc_handler = proc_dointvec
265 }, 185 },
266 { 186 {
267 .ctl_name = NET_TCP_MAX_ORPHANS,
268 .procname = "tcp_max_orphans", 187 .procname = "tcp_max_orphans",
269 .data = &sysctl_tcp_max_orphans, 188 .data = &sysctl_tcp_max_orphans,
270 .maxlen = sizeof(int), 189 .maxlen = sizeof(int),
@@ -272,7 +191,6 @@ static struct ctl_table ipv4_table[] = {
272 .proc_handler = proc_dointvec 191 .proc_handler = proc_dointvec
273 }, 192 },
274 { 193 {
275 .ctl_name = NET_TCP_MAX_TW_BUCKETS,
276 .procname = "tcp_max_tw_buckets", 194 .procname = "tcp_max_tw_buckets",
277 .data = &tcp_death_row.sysctl_max_tw_buckets, 195 .data = &tcp_death_row.sysctl_max_tw_buckets,
278 .maxlen = sizeof(int), 196 .maxlen = sizeof(int),
@@ -280,7 +198,6 @@ static struct ctl_table ipv4_table[] = {
280 .proc_handler = proc_dointvec 198 .proc_handler = proc_dointvec
281 }, 199 },
282 { 200 {
283 .ctl_name = NET_IPV4_DYNADDR,
284 .procname = "ip_dynaddr", 201 .procname = "ip_dynaddr",
285 .data = &sysctl_ip_dynaddr, 202 .data = &sysctl_ip_dynaddr,
286 .maxlen = sizeof(int), 203 .maxlen = sizeof(int),
@@ -288,16 +205,13 @@ static struct ctl_table ipv4_table[] = {
288 .proc_handler = proc_dointvec 205 .proc_handler = proc_dointvec
289 }, 206 },
290 { 207 {
291 .ctl_name = NET_IPV4_TCP_KEEPALIVE_TIME,
292 .procname = "tcp_keepalive_time", 208 .procname = "tcp_keepalive_time",
293 .data = &sysctl_tcp_keepalive_time, 209 .data = &sysctl_tcp_keepalive_time,
294 .maxlen = sizeof(int), 210 .maxlen = sizeof(int),
295 .mode = 0644, 211 .mode = 0644,
296 .proc_handler = proc_dointvec_jiffies, 212 .proc_handler = proc_dointvec_jiffies,
297 .strategy = sysctl_jiffies
298 }, 213 },
299 { 214 {
300 .ctl_name = NET_IPV4_TCP_KEEPALIVE_PROBES,
301 .procname = "tcp_keepalive_probes", 215 .procname = "tcp_keepalive_probes",
302 .data = &sysctl_tcp_keepalive_probes, 216 .data = &sysctl_tcp_keepalive_probes,
303 .maxlen = sizeof(int), 217 .maxlen = sizeof(int),
@@ -305,26 +219,21 @@ static struct ctl_table ipv4_table[] = {
305 .proc_handler = proc_dointvec 219 .proc_handler = proc_dointvec
306 }, 220 },
307 { 221 {
308 .ctl_name = NET_IPV4_TCP_KEEPALIVE_INTVL,
309 .procname = "tcp_keepalive_intvl", 222 .procname = "tcp_keepalive_intvl",
310 .data = &sysctl_tcp_keepalive_intvl, 223 .data = &sysctl_tcp_keepalive_intvl,
311 .maxlen = sizeof(int), 224 .maxlen = sizeof(int),
312 .mode = 0644, 225 .mode = 0644,
313 .proc_handler = proc_dointvec_jiffies, 226 .proc_handler = proc_dointvec_jiffies,
314 .strategy = sysctl_jiffies
315 }, 227 },
316 { 228 {
317 .ctl_name = NET_IPV4_TCP_RETRIES1,
318 .procname = "tcp_retries1", 229 .procname = "tcp_retries1",
319 .data = &sysctl_tcp_retries1, 230 .data = &sysctl_tcp_retries1,
320 .maxlen = sizeof(int), 231 .maxlen = sizeof(int),
321 .mode = 0644, 232 .mode = 0644,
322 .proc_handler = proc_dointvec_minmax, 233 .proc_handler = proc_dointvec_minmax,
323 .strategy = sysctl_intvec,
324 .extra2 = &tcp_retr1_max 234 .extra2 = &tcp_retr1_max
325 }, 235 },
326 { 236 {
327 .ctl_name = NET_IPV4_TCP_RETRIES2,
328 .procname = "tcp_retries2", 237 .procname = "tcp_retries2",
329 .data = &sysctl_tcp_retries2, 238 .data = &sysctl_tcp_retries2,
330 .maxlen = sizeof(int), 239 .maxlen = sizeof(int),
@@ -332,17 +241,14 @@ static struct ctl_table ipv4_table[] = {
332 .proc_handler = proc_dointvec 241 .proc_handler = proc_dointvec
333 }, 242 },
334 { 243 {
335 .ctl_name = NET_IPV4_TCP_FIN_TIMEOUT,
336 .procname = "tcp_fin_timeout", 244 .procname = "tcp_fin_timeout",
337 .data = &sysctl_tcp_fin_timeout, 245 .data = &sysctl_tcp_fin_timeout,
338 .maxlen = sizeof(int), 246 .maxlen = sizeof(int),
339 .mode = 0644, 247 .mode = 0644,
340 .proc_handler = proc_dointvec_jiffies, 248 .proc_handler = proc_dointvec_jiffies,
341 .strategy = sysctl_jiffies
342 }, 249 },
343#ifdef CONFIG_SYN_COOKIES 250#ifdef CONFIG_SYN_COOKIES
344 { 251 {
345 .ctl_name = NET_TCP_SYNCOOKIES,
346 .procname = "tcp_syncookies", 252 .procname = "tcp_syncookies",
347 .data = &sysctl_tcp_syncookies, 253 .data = &sysctl_tcp_syncookies,
348 .maxlen = sizeof(int), 254 .maxlen = sizeof(int),
@@ -351,7 +257,6 @@ static struct ctl_table ipv4_table[] = {
351 }, 257 },
352#endif 258#endif
353 { 259 {
354 .ctl_name = NET_TCP_TW_RECYCLE,
355 .procname = "tcp_tw_recycle", 260 .procname = "tcp_tw_recycle",
356 .data = &tcp_death_row.sysctl_tw_recycle, 261 .data = &tcp_death_row.sysctl_tw_recycle,
357 .maxlen = sizeof(int), 262 .maxlen = sizeof(int),
@@ -359,7 +264,6 @@ static struct ctl_table ipv4_table[] = {
359 .proc_handler = proc_dointvec 264 .proc_handler = proc_dointvec
360 }, 265 },
361 { 266 {
362 .ctl_name = NET_TCP_ABORT_ON_OVERFLOW,
363 .procname = "tcp_abort_on_overflow", 267 .procname = "tcp_abort_on_overflow",
364 .data = &sysctl_tcp_abort_on_overflow, 268 .data = &sysctl_tcp_abort_on_overflow,
365 .maxlen = sizeof(int), 269 .maxlen = sizeof(int),
@@ -367,7 +271,6 @@ static struct ctl_table ipv4_table[] = {
367 .proc_handler = proc_dointvec 271 .proc_handler = proc_dointvec
368 }, 272 },
369 { 273 {
370 .ctl_name = NET_TCP_STDURG,
371 .procname = "tcp_stdurg", 274 .procname = "tcp_stdurg",
372 .data = &sysctl_tcp_stdurg, 275 .data = &sysctl_tcp_stdurg,
373 .maxlen = sizeof(int), 276 .maxlen = sizeof(int),
@@ -375,7 +278,6 @@ static struct ctl_table ipv4_table[] = {
375 .proc_handler = proc_dointvec 278 .proc_handler = proc_dointvec
376 }, 279 },
377 { 280 {
378 .ctl_name = NET_TCP_RFC1337,
379 .procname = "tcp_rfc1337", 281 .procname = "tcp_rfc1337",
380 .data = &sysctl_tcp_rfc1337, 282 .data = &sysctl_tcp_rfc1337,
381 .maxlen = sizeof(int), 283 .maxlen = sizeof(int),
@@ -383,7 +285,6 @@ static struct ctl_table ipv4_table[] = {
383 .proc_handler = proc_dointvec 285 .proc_handler = proc_dointvec
384 }, 286 },
385 { 287 {
386 .ctl_name = NET_TCP_MAX_SYN_BACKLOG,
387 .procname = "tcp_max_syn_backlog", 288 .procname = "tcp_max_syn_backlog",
388 .data = &sysctl_max_syn_backlog, 289 .data = &sysctl_max_syn_backlog,
389 .maxlen = sizeof(int), 290 .maxlen = sizeof(int),
@@ -391,17 +292,14 @@ static struct ctl_table ipv4_table[] = {
391 .proc_handler = proc_dointvec 292 .proc_handler = proc_dointvec
392 }, 293 },
393 { 294 {
394 .ctl_name = NET_IPV4_LOCAL_PORT_RANGE,
395 .procname = "ip_local_port_range", 295 .procname = "ip_local_port_range",
396 .data = &sysctl_local_ports.range, 296 .data = &sysctl_local_ports.range,
397 .maxlen = sizeof(sysctl_local_ports.range), 297 .maxlen = sizeof(sysctl_local_ports.range),
398 .mode = 0644, 298 .mode = 0644,
399 .proc_handler = ipv4_local_port_range, 299 .proc_handler = ipv4_local_port_range,
400 .strategy = ipv4_sysctl_local_port_range,
401 }, 300 },
402#ifdef CONFIG_IP_MULTICAST 301#ifdef CONFIG_IP_MULTICAST
403 { 302 {
404 .ctl_name = NET_IPV4_IGMP_MAX_MEMBERSHIPS,
405 .procname = "igmp_max_memberships", 303 .procname = "igmp_max_memberships",
406 .data = &sysctl_igmp_max_memberships, 304 .data = &sysctl_igmp_max_memberships,
407 .maxlen = sizeof(int), 305 .maxlen = sizeof(int),
@@ -411,7 +309,6 @@ static struct ctl_table ipv4_table[] = {
411 309
412#endif 310#endif
413 { 311 {
414 .ctl_name = NET_IPV4_IGMP_MAX_MSF,
415 .procname = "igmp_max_msf", 312 .procname = "igmp_max_msf",
416 .data = &sysctl_igmp_max_msf, 313 .data = &sysctl_igmp_max_msf,
417 .maxlen = sizeof(int), 314 .maxlen = sizeof(int),
@@ -419,7 +316,6 @@ static struct ctl_table ipv4_table[] = {
419 .proc_handler = proc_dointvec 316 .proc_handler = proc_dointvec
420 }, 317 },
421 { 318 {
422 .ctl_name = NET_IPV4_INET_PEER_THRESHOLD,
423 .procname = "inet_peer_threshold", 319 .procname = "inet_peer_threshold",
424 .data = &inet_peer_threshold, 320 .data = &inet_peer_threshold,
425 .maxlen = sizeof(int), 321 .maxlen = sizeof(int),
@@ -427,43 +323,34 @@ static struct ctl_table ipv4_table[] = {
427 .proc_handler = proc_dointvec 323 .proc_handler = proc_dointvec
428 }, 324 },
429 { 325 {
430 .ctl_name = NET_IPV4_INET_PEER_MINTTL,
431 .procname = "inet_peer_minttl", 326 .procname = "inet_peer_minttl",
432 .data = &inet_peer_minttl, 327 .data = &inet_peer_minttl,
433 .maxlen = sizeof(int), 328 .maxlen = sizeof(int),
434 .mode = 0644, 329 .mode = 0644,
435 .proc_handler = proc_dointvec_jiffies, 330 .proc_handler = proc_dointvec_jiffies,
436 .strategy = sysctl_jiffies
437 }, 331 },
438 { 332 {
439 .ctl_name = NET_IPV4_INET_PEER_MAXTTL,
440 .procname = "inet_peer_maxttl", 333 .procname = "inet_peer_maxttl",
441 .data = &inet_peer_maxttl, 334 .data = &inet_peer_maxttl,
442 .maxlen = sizeof(int), 335 .maxlen = sizeof(int),
443 .mode = 0644, 336 .mode = 0644,
444 .proc_handler = proc_dointvec_jiffies, 337 .proc_handler = proc_dointvec_jiffies,
445 .strategy = sysctl_jiffies
446 }, 338 },
447 { 339 {
448 .ctl_name = NET_IPV4_INET_PEER_GC_MINTIME,
449 .procname = "inet_peer_gc_mintime", 340 .procname = "inet_peer_gc_mintime",
450 .data = &inet_peer_gc_mintime, 341 .data = &inet_peer_gc_mintime,
451 .maxlen = sizeof(int), 342 .maxlen = sizeof(int),
452 .mode = 0644, 343 .mode = 0644,
453 .proc_handler = proc_dointvec_jiffies, 344 .proc_handler = proc_dointvec_jiffies,
454 .strategy = sysctl_jiffies
455 }, 345 },
456 { 346 {
457 .ctl_name = NET_IPV4_INET_PEER_GC_MAXTIME,
458 .procname = "inet_peer_gc_maxtime", 347 .procname = "inet_peer_gc_maxtime",
459 .data = &inet_peer_gc_maxtime, 348 .data = &inet_peer_gc_maxtime,
460 .maxlen = sizeof(int), 349 .maxlen = sizeof(int),
461 .mode = 0644, 350 .mode = 0644,
462 .proc_handler = proc_dointvec_jiffies, 351 .proc_handler = proc_dointvec_jiffies,
463 .strategy = sysctl_jiffies
464 }, 352 },
465 { 353 {
466 .ctl_name = NET_TCP_ORPHAN_RETRIES,
467 .procname = "tcp_orphan_retries", 354 .procname = "tcp_orphan_retries",
468 .data = &sysctl_tcp_orphan_retries, 355 .data = &sysctl_tcp_orphan_retries,
469 .maxlen = sizeof(int), 356 .maxlen = sizeof(int),
@@ -471,7 +358,6 @@ static struct ctl_table ipv4_table[] = {
471 .proc_handler = proc_dointvec 358 .proc_handler = proc_dointvec
472 }, 359 },
473 { 360 {
474 .ctl_name = NET_TCP_FACK,
475 .procname = "tcp_fack", 361 .procname = "tcp_fack",
476 .data = &sysctl_tcp_fack, 362 .data = &sysctl_tcp_fack,
477 .maxlen = sizeof(int), 363 .maxlen = sizeof(int),
@@ -479,7 +365,6 @@ static struct ctl_table ipv4_table[] = {
479 .proc_handler = proc_dointvec 365 .proc_handler = proc_dointvec
480 }, 366 },
481 { 367 {
482 .ctl_name = NET_TCP_REORDERING,
483 .procname = "tcp_reordering", 368 .procname = "tcp_reordering",
484 .data = &sysctl_tcp_reordering, 369 .data = &sysctl_tcp_reordering,
485 .maxlen = sizeof(int), 370 .maxlen = sizeof(int),
@@ -487,7 +372,6 @@ static struct ctl_table ipv4_table[] = {
487 .proc_handler = proc_dointvec 372 .proc_handler = proc_dointvec
488 }, 373 },
489 { 374 {
490 .ctl_name = NET_TCP_ECN,
491 .procname = "tcp_ecn", 375 .procname = "tcp_ecn",
492 .data = &sysctl_tcp_ecn, 376 .data = &sysctl_tcp_ecn,
493 .maxlen = sizeof(int), 377 .maxlen = sizeof(int),
@@ -495,7 +379,6 @@ static struct ctl_table ipv4_table[] = {
495 .proc_handler = proc_dointvec 379 .proc_handler = proc_dointvec
496 }, 380 },
497 { 381 {
498 .ctl_name = NET_TCP_DSACK,
499 .procname = "tcp_dsack", 382 .procname = "tcp_dsack",
500 .data = &sysctl_tcp_dsack, 383 .data = &sysctl_tcp_dsack,
501 .maxlen = sizeof(int), 384 .maxlen = sizeof(int),
@@ -503,7 +386,6 @@ static struct ctl_table ipv4_table[] = {
503 .proc_handler = proc_dointvec 386 .proc_handler = proc_dointvec
504 }, 387 },
505 { 388 {
506 .ctl_name = NET_TCP_MEM,
507 .procname = "tcp_mem", 389 .procname = "tcp_mem",
508 .data = &sysctl_tcp_mem, 390 .data = &sysctl_tcp_mem,
509 .maxlen = sizeof(sysctl_tcp_mem), 391 .maxlen = sizeof(sysctl_tcp_mem),
@@ -511,7 +393,6 @@ static struct ctl_table ipv4_table[] = {
511 .proc_handler = proc_dointvec 393 .proc_handler = proc_dointvec
512 }, 394 },
513 { 395 {
514 .ctl_name = NET_TCP_WMEM,
515 .procname = "tcp_wmem", 396 .procname = "tcp_wmem",
516 .data = &sysctl_tcp_wmem, 397 .data = &sysctl_tcp_wmem,
517 .maxlen = sizeof(sysctl_tcp_wmem), 398 .maxlen = sizeof(sysctl_tcp_wmem),
@@ -519,7 +400,6 @@ static struct ctl_table ipv4_table[] = {
519 .proc_handler = proc_dointvec 400 .proc_handler = proc_dointvec
520 }, 401 },
521 { 402 {
522 .ctl_name = NET_TCP_RMEM,
523 .procname = "tcp_rmem", 403 .procname = "tcp_rmem",
524 .data = &sysctl_tcp_rmem, 404 .data = &sysctl_tcp_rmem,
525 .maxlen = sizeof(sysctl_tcp_rmem), 405 .maxlen = sizeof(sysctl_tcp_rmem),
@@ -527,7 +407,6 @@ static struct ctl_table ipv4_table[] = {
527 .proc_handler = proc_dointvec 407 .proc_handler = proc_dointvec
528 }, 408 },
529 { 409 {
530 .ctl_name = NET_TCP_APP_WIN,
531 .procname = "tcp_app_win", 410 .procname = "tcp_app_win",
532 .data = &sysctl_tcp_app_win, 411 .data = &sysctl_tcp_app_win,
533 .maxlen = sizeof(int), 412 .maxlen = sizeof(int),
@@ -535,7 +414,6 @@ static struct ctl_table ipv4_table[] = {
535 .proc_handler = proc_dointvec 414 .proc_handler = proc_dointvec
536 }, 415 },
537 { 416 {
538 .ctl_name = NET_TCP_ADV_WIN_SCALE,
539 .procname = "tcp_adv_win_scale", 417 .procname = "tcp_adv_win_scale",
540 .data = &sysctl_tcp_adv_win_scale, 418 .data = &sysctl_tcp_adv_win_scale,
541 .maxlen = sizeof(int), 419 .maxlen = sizeof(int),
@@ -543,7 +421,6 @@ static struct ctl_table ipv4_table[] = {
543 .proc_handler = proc_dointvec 421 .proc_handler = proc_dointvec
544 }, 422 },
545 { 423 {
546 .ctl_name = NET_TCP_TW_REUSE,
547 .procname = "tcp_tw_reuse", 424 .procname = "tcp_tw_reuse",
548 .data = &sysctl_tcp_tw_reuse, 425 .data = &sysctl_tcp_tw_reuse,
549 .maxlen = sizeof(int), 426 .maxlen = sizeof(int),
@@ -551,7 +428,6 @@ static struct ctl_table ipv4_table[] = {
551 .proc_handler = proc_dointvec 428 .proc_handler = proc_dointvec
552 }, 429 },
553 { 430 {
554 .ctl_name = NET_TCP_FRTO,
555 .procname = "tcp_frto", 431 .procname = "tcp_frto",
556 .data = &sysctl_tcp_frto, 432 .data = &sysctl_tcp_frto,
557 .maxlen = sizeof(int), 433 .maxlen = sizeof(int),
@@ -559,7 +435,6 @@ static struct ctl_table ipv4_table[] = {
559 .proc_handler = proc_dointvec 435 .proc_handler = proc_dointvec
560 }, 436 },
561 { 437 {
562 .ctl_name = NET_TCP_FRTO_RESPONSE,
563 .procname = "tcp_frto_response", 438 .procname = "tcp_frto_response",
564 .data = &sysctl_tcp_frto_response, 439 .data = &sysctl_tcp_frto_response,
565 .maxlen = sizeof(int), 440 .maxlen = sizeof(int),
@@ -567,7 +442,6 @@ static struct ctl_table ipv4_table[] = {
567 .proc_handler = proc_dointvec 442 .proc_handler = proc_dointvec
568 }, 443 },
569 { 444 {
570 .ctl_name = NET_TCP_LOW_LATENCY,
571 .procname = "tcp_low_latency", 445 .procname = "tcp_low_latency",
572 .data = &sysctl_tcp_low_latency, 446 .data = &sysctl_tcp_low_latency,
573 .maxlen = sizeof(int), 447 .maxlen = sizeof(int),
@@ -575,7 +449,6 @@ static struct ctl_table ipv4_table[] = {
575 .proc_handler = proc_dointvec 449 .proc_handler = proc_dointvec
576 }, 450 },
577 { 451 {
578 .ctl_name = NET_TCP_NO_METRICS_SAVE,
579 .procname = "tcp_no_metrics_save", 452 .procname = "tcp_no_metrics_save",
580 .data = &sysctl_tcp_nometrics_save, 453 .data = &sysctl_tcp_nometrics_save,
581 .maxlen = sizeof(int), 454 .maxlen = sizeof(int),
@@ -583,7 +456,6 @@ static struct ctl_table ipv4_table[] = {
583 .proc_handler = proc_dointvec, 456 .proc_handler = proc_dointvec,
584 }, 457 },
585 { 458 {
586 .ctl_name = NET_TCP_MODERATE_RCVBUF,
587 .procname = "tcp_moderate_rcvbuf", 459 .procname = "tcp_moderate_rcvbuf",
588 .data = &sysctl_tcp_moderate_rcvbuf, 460 .data = &sysctl_tcp_moderate_rcvbuf,
589 .maxlen = sizeof(int), 461 .maxlen = sizeof(int),
@@ -591,7 +463,6 @@ static struct ctl_table ipv4_table[] = {
591 .proc_handler = proc_dointvec, 463 .proc_handler = proc_dointvec,
592 }, 464 },
593 { 465 {
594 .ctl_name = NET_TCP_TSO_WIN_DIVISOR,
595 .procname = "tcp_tso_win_divisor", 466 .procname = "tcp_tso_win_divisor",
596 .data = &sysctl_tcp_tso_win_divisor, 467 .data = &sysctl_tcp_tso_win_divisor,
597 .maxlen = sizeof(int), 468 .maxlen = sizeof(int),
@@ -599,15 +470,12 @@ static struct ctl_table ipv4_table[] = {
599 .proc_handler = proc_dointvec, 470 .proc_handler = proc_dointvec,
600 }, 471 },
601 { 472 {
602 .ctl_name = NET_TCP_CONG_CONTROL,
603 .procname = "tcp_congestion_control", 473 .procname = "tcp_congestion_control",
604 .mode = 0644, 474 .mode = 0644,
605 .maxlen = TCP_CA_NAME_MAX, 475 .maxlen = TCP_CA_NAME_MAX,
606 .proc_handler = proc_tcp_congestion_control, 476 .proc_handler = proc_tcp_congestion_control,
607 .strategy = sysctl_tcp_congestion_control,
608 }, 477 },
609 { 478 {
610 .ctl_name = NET_TCP_ABC,
611 .procname = "tcp_abc", 479 .procname = "tcp_abc",
612 .data = &sysctl_tcp_abc, 480 .data = &sysctl_tcp_abc,
613 .maxlen = sizeof(int), 481 .maxlen = sizeof(int),
@@ -615,7 +483,6 @@ static struct ctl_table ipv4_table[] = {
615 .proc_handler = proc_dointvec, 483 .proc_handler = proc_dointvec,
616 }, 484 },
617 { 485 {
618 .ctl_name = NET_TCP_MTU_PROBING,
619 .procname = "tcp_mtu_probing", 486 .procname = "tcp_mtu_probing",
620 .data = &sysctl_tcp_mtu_probing, 487 .data = &sysctl_tcp_mtu_probing,
621 .maxlen = sizeof(int), 488 .maxlen = sizeof(int),
@@ -623,7 +490,6 @@ static struct ctl_table ipv4_table[] = {
623 .proc_handler = proc_dointvec, 490 .proc_handler = proc_dointvec,
624 }, 491 },
625 { 492 {
626 .ctl_name = NET_TCP_BASE_MSS,
627 .procname = "tcp_base_mss", 493 .procname = "tcp_base_mss",
628 .data = &sysctl_tcp_base_mss, 494 .data = &sysctl_tcp_base_mss,
629 .maxlen = sizeof(int), 495 .maxlen = sizeof(int),
@@ -631,7 +497,6 @@ static struct ctl_table ipv4_table[] = {
631 .proc_handler = proc_dointvec, 497 .proc_handler = proc_dointvec,
632 }, 498 },
633 { 499 {
634 .ctl_name = NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS,
635 .procname = "tcp_workaround_signed_windows", 500 .procname = "tcp_workaround_signed_windows",
636 .data = &sysctl_tcp_workaround_signed_windows, 501 .data = &sysctl_tcp_workaround_signed_windows,
637 .maxlen = sizeof(int), 502 .maxlen = sizeof(int),
@@ -640,7 +505,6 @@ static struct ctl_table ipv4_table[] = {
640 }, 505 },
641#ifdef CONFIG_NET_DMA 506#ifdef CONFIG_NET_DMA
642 { 507 {
643 .ctl_name = NET_TCP_DMA_COPYBREAK,
644 .procname = "tcp_dma_copybreak", 508 .procname = "tcp_dma_copybreak",
645 .data = &sysctl_tcp_dma_copybreak, 509 .data = &sysctl_tcp_dma_copybreak,
646 .maxlen = sizeof(int), 510 .maxlen = sizeof(int),
@@ -649,7 +513,6 @@ static struct ctl_table ipv4_table[] = {
649 }, 513 },
650#endif 514#endif
651 { 515 {
652 .ctl_name = NET_TCP_SLOW_START_AFTER_IDLE,
653 .procname = "tcp_slow_start_after_idle", 516 .procname = "tcp_slow_start_after_idle",
654 .data = &sysctl_tcp_slow_start_after_idle, 517 .data = &sysctl_tcp_slow_start_after_idle,
655 .maxlen = sizeof(int), 518 .maxlen = sizeof(int),
@@ -658,7 +521,6 @@ static struct ctl_table ipv4_table[] = {
658 }, 521 },
659#ifdef CONFIG_NETLABEL 522#ifdef CONFIG_NETLABEL
660 { 523 {
661 .ctl_name = NET_CIPSOV4_CACHE_ENABLE,
662 .procname = "cipso_cache_enable", 524 .procname = "cipso_cache_enable",
663 .data = &cipso_v4_cache_enabled, 525 .data = &cipso_v4_cache_enabled,
664 .maxlen = sizeof(int), 526 .maxlen = sizeof(int),
@@ -666,7 +528,6 @@ static struct ctl_table ipv4_table[] = {
666 .proc_handler = proc_dointvec, 528 .proc_handler = proc_dointvec,
667 }, 529 },
668 { 530 {
669 .ctl_name = NET_CIPSOV4_CACHE_BUCKET_SIZE,
670 .procname = "cipso_cache_bucket_size", 531 .procname = "cipso_cache_bucket_size",
671 .data = &cipso_v4_cache_bucketsize, 532 .data = &cipso_v4_cache_bucketsize,
672 .maxlen = sizeof(int), 533 .maxlen = sizeof(int),
@@ -674,7 +535,6 @@ static struct ctl_table ipv4_table[] = {
674 .proc_handler = proc_dointvec, 535 .proc_handler = proc_dointvec,
675 }, 536 },
676 { 537 {
677 .ctl_name = NET_CIPSOV4_RBM_OPTFMT,
678 .procname = "cipso_rbm_optfmt", 538 .procname = "cipso_rbm_optfmt",
679 .data = &cipso_v4_rbm_optfmt, 539 .data = &cipso_v4_rbm_optfmt,
680 .maxlen = sizeof(int), 540 .maxlen = sizeof(int),
@@ -682,7 +542,6 @@ static struct ctl_table ipv4_table[] = {
682 .proc_handler = proc_dointvec, 542 .proc_handler = proc_dointvec,
683 }, 543 },
684 { 544 {
685 .ctl_name = NET_CIPSOV4_RBM_STRICTVALID,
686 .procname = "cipso_rbm_strictvalid", 545 .procname = "cipso_rbm_strictvalid",
687 .data = &cipso_v4_rbm_strictvalid, 546 .data = &cipso_v4_rbm_strictvalid,
688 .maxlen = sizeof(int), 547 .maxlen = sizeof(int),
@@ -697,15 +556,12 @@ static struct ctl_table ipv4_table[] = {
697 .proc_handler = proc_tcp_available_congestion_control, 556 .proc_handler = proc_tcp_available_congestion_control,
698 }, 557 },
699 { 558 {
700 .ctl_name = NET_TCP_ALLOWED_CONG_CONTROL,
701 .procname = "tcp_allowed_congestion_control", 559 .procname = "tcp_allowed_congestion_control",
702 .maxlen = TCP_CA_BUF_MAX, 560 .maxlen = TCP_CA_BUF_MAX,
703 .mode = 0644, 561 .mode = 0644,
704 .proc_handler = proc_allowed_congestion_control, 562 .proc_handler = proc_allowed_congestion_control,
705 .strategy = strategy_allowed_congestion_control,
706 }, 563 },
707 { 564 {
708 .ctl_name = NET_TCP_MAX_SSTHRESH,
709 .procname = "tcp_max_ssthresh", 565 .procname = "tcp_max_ssthresh",
710 .data = &sysctl_tcp_max_ssthresh, 566 .data = &sysctl_tcp_max_ssthresh,
711 .maxlen = sizeof(int), 567 .maxlen = sizeof(int),
@@ -713,7 +569,6 @@ static struct ctl_table ipv4_table[] = {
713 .proc_handler = proc_dointvec, 569 .proc_handler = proc_dointvec,
714 }, 570 },
715 { 571 {
716 .ctl_name = CTL_UNNUMBERED,
717 .procname = "tcp_cookie_size", 572 .procname = "tcp_cookie_size",
718 .data = &sysctl_tcp_cookie_size, 573 .data = &sysctl_tcp_cookie_size,
719 .maxlen = sizeof(int), 574 .maxlen = sizeof(int),
@@ -721,41 +576,34 @@ static struct ctl_table ipv4_table[] = {
721 .proc_handler = proc_dointvec 576 .proc_handler = proc_dointvec
722 }, 577 },
723 { 578 {
724 .ctl_name = CTL_UNNUMBERED,
725 .procname = "udp_mem", 579 .procname = "udp_mem",
726 .data = &sysctl_udp_mem, 580 .data = &sysctl_udp_mem,
727 .maxlen = sizeof(sysctl_udp_mem), 581 .maxlen = sizeof(sysctl_udp_mem),
728 .mode = 0644, 582 .mode = 0644,
729 .proc_handler = proc_dointvec_minmax, 583 .proc_handler = proc_dointvec_minmax,
730 .strategy = sysctl_intvec,
731 .extra1 = &zero 584 .extra1 = &zero
732 }, 585 },
733 { 586 {
734 .ctl_name = CTL_UNNUMBERED,
735 .procname = "udp_rmem_min", 587 .procname = "udp_rmem_min",
736 .data = &sysctl_udp_rmem_min, 588 .data = &sysctl_udp_rmem_min,
737 .maxlen = sizeof(sysctl_udp_rmem_min), 589 .maxlen = sizeof(sysctl_udp_rmem_min),
738 .mode = 0644, 590 .mode = 0644,
739 .proc_handler = proc_dointvec_minmax, 591 .proc_handler = proc_dointvec_minmax,
740 .strategy = sysctl_intvec,
741 .extra1 = &zero 592 .extra1 = &zero
742 }, 593 },
743 { 594 {
744 .ctl_name = CTL_UNNUMBERED,
745 .procname = "udp_wmem_min", 595 .procname = "udp_wmem_min",
746 .data = &sysctl_udp_wmem_min, 596 .data = &sysctl_udp_wmem_min,
747 .maxlen = sizeof(sysctl_udp_wmem_min), 597 .maxlen = sizeof(sysctl_udp_wmem_min),
748 .mode = 0644, 598 .mode = 0644,
749 .proc_handler = proc_dointvec_minmax, 599 .proc_handler = proc_dointvec_minmax,
750 .strategy = sysctl_intvec,
751 .extra1 = &zero 600 .extra1 = &zero
752 }, 601 },
753 { .ctl_name = 0 } 602 { }
754}; 603};
755 604
756static struct ctl_table ipv4_net_table[] = { 605static struct ctl_table ipv4_net_table[] = {
757 { 606 {
758 .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_ALL,
759 .procname = "icmp_echo_ignore_all", 607 .procname = "icmp_echo_ignore_all",
760 .data = &init_net.ipv4.sysctl_icmp_echo_ignore_all, 608 .data = &init_net.ipv4.sysctl_icmp_echo_ignore_all,
761 .maxlen = sizeof(int), 609 .maxlen = sizeof(int),
@@ -763,7 +611,6 @@ static struct ctl_table ipv4_net_table[] = {
763 .proc_handler = proc_dointvec 611 .proc_handler = proc_dointvec
764 }, 612 },
765 { 613 {
766 .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS,
767 .procname = "icmp_echo_ignore_broadcasts", 614 .procname = "icmp_echo_ignore_broadcasts",
768 .data = &init_net.ipv4.sysctl_icmp_echo_ignore_broadcasts, 615 .data = &init_net.ipv4.sysctl_icmp_echo_ignore_broadcasts,
769 .maxlen = sizeof(int), 616 .maxlen = sizeof(int),
@@ -771,7 +618,6 @@ static struct ctl_table ipv4_net_table[] = {
771 .proc_handler = proc_dointvec 618 .proc_handler = proc_dointvec
772 }, 619 },
773 { 620 {
774 .ctl_name = NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES,
775 .procname = "icmp_ignore_bogus_error_responses", 621 .procname = "icmp_ignore_bogus_error_responses",
776 .data = &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses, 622 .data = &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses,
777 .maxlen = sizeof(int), 623 .maxlen = sizeof(int),
@@ -779,7 +625,6 @@ static struct ctl_table ipv4_net_table[] = {
779 .proc_handler = proc_dointvec 625 .proc_handler = proc_dointvec
780 }, 626 },
781 { 627 {
782 .ctl_name = NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR,
783 .procname = "icmp_errors_use_inbound_ifaddr", 628 .procname = "icmp_errors_use_inbound_ifaddr",
784 .data = &init_net.ipv4.sysctl_icmp_errors_use_inbound_ifaddr, 629 .data = &init_net.ipv4.sysctl_icmp_errors_use_inbound_ifaddr,
785 .maxlen = sizeof(int), 630 .maxlen = sizeof(int),
@@ -787,16 +632,13 @@ static struct ctl_table ipv4_net_table[] = {
787 .proc_handler = proc_dointvec 632 .proc_handler = proc_dointvec
788 }, 633 },
789 { 634 {
790 .ctl_name = NET_IPV4_ICMP_RATELIMIT,
791 .procname = "icmp_ratelimit", 635 .procname = "icmp_ratelimit",
792 .data = &init_net.ipv4.sysctl_icmp_ratelimit, 636 .data = &init_net.ipv4.sysctl_icmp_ratelimit,
793 .maxlen = sizeof(int), 637 .maxlen = sizeof(int),
794 .mode = 0644, 638 .mode = 0644,
795 .proc_handler = proc_dointvec_ms_jiffies, 639 .proc_handler = proc_dointvec_ms_jiffies,
796 .strategy = sysctl_ms_jiffies
797 }, 640 },
798 { 641 {
799 .ctl_name = NET_IPV4_ICMP_RATEMASK,
800 .procname = "icmp_ratemask", 642 .procname = "icmp_ratemask",
801 .data = &init_net.ipv4.sysctl_icmp_ratemask, 643 .data = &init_net.ipv4.sysctl_icmp_ratemask,
802 .maxlen = sizeof(int), 644 .maxlen = sizeof(int),
@@ -804,7 +646,6 @@ static struct ctl_table ipv4_net_table[] = {
804 .proc_handler = proc_dointvec 646 .proc_handler = proc_dointvec
805 }, 647 },
806 { 648 {
807 .ctl_name = CTL_UNNUMBERED,
808 .procname = "rt_cache_rebuild_count", 649 .procname = "rt_cache_rebuild_count",
809 .data = &init_net.ipv4.sysctl_rt_cache_rebuild_count, 650 .data = &init_net.ipv4.sysctl_rt_cache_rebuild_count,
810 .maxlen = sizeof(int), 651 .maxlen = sizeof(int),
@@ -815,8 +656,8 @@ static struct ctl_table ipv4_net_table[] = {
815}; 656};
816 657
817struct ctl_path net_ipv4_ctl_path[] = { 658struct ctl_path net_ipv4_ctl_path[] = {
818 { .procname = "net", .ctl_name = CTL_NET, }, 659 { .procname = "net", },
819 { .procname = "ipv4", .ctl_name = NET_IPV4, }, 660 { .procname = "ipv4", },
820 { }, 661 { },
821}; 662};
822EXPORT_SYMBOL_GPL(net_ipv4_ctl_path); 663EXPORT_SYMBOL_GPL(net_ipv4_ctl_path);
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 74fb2eb833ec..8c08a28d8f83 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -267,7 +267,6 @@ static struct xfrm_policy_afinfo xfrm4_policy_afinfo = {
267#ifdef CONFIG_SYSCTL 267#ifdef CONFIG_SYSCTL
268static struct ctl_table xfrm4_policy_table[] = { 268static struct ctl_table xfrm4_policy_table[] = {
269 { 269 {
270 .ctl_name = CTL_UNNUMBERED,
271 .procname = "xfrm4_gc_thresh", 270 .procname = "xfrm4_gc_thresh",
272 .data = &xfrm4_dst_ops.gc_thresh, 271 .data = &xfrm4_dst_ops.gc_thresh,
273 .maxlen = sizeof(int), 272 .maxlen = sizeof(int),
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b1ce8fc62049..de7a194a64ab 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4037,41 +4037,6 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write,
4037 return ret; 4037 return ret;
4038} 4038}
4039 4039
4040static int addrconf_sysctl_forward_strategy(ctl_table *table,
4041 void __user *oldval,
4042 size_t __user *oldlenp,
4043 void __user *newval, size_t newlen)
4044{
4045 int *valp = table->data;
4046 int val = *valp;
4047 int new;
4048
4049 if (!newval || !newlen)
4050 return 0;
4051 if (newlen != sizeof(int))
4052 return -EINVAL;
4053 if (get_user(new, (int __user *)newval))
4054 return -EFAULT;
4055 if (new == *valp)
4056 return 0;
4057 if (oldval && oldlenp) {
4058 size_t len;
4059 if (get_user(len, oldlenp))
4060 return -EFAULT;
4061 if (len) {
4062 if (len > table->maxlen)
4063 len = table->maxlen;
4064 if (copy_to_user(oldval, valp, len))
4065 return -EFAULT;
4066 if (put_user(len, oldlenp))
4067 return -EFAULT;
4068 }
4069 }
4070
4071 *valp = new;
4072 return addrconf_fixup_forwarding(table, valp, val);
4073}
4074
4075static void dev_disable_change(struct inet6_dev *idev) 4040static void dev_disable_change(struct inet6_dev *idev)
4076{ 4041{
4077 if (!idev || !idev->dev) 4042 if (!idev || !idev->dev)
@@ -4148,16 +4113,13 @@ static struct addrconf_sysctl_table
4148 .sysctl_header = NULL, 4113 .sysctl_header = NULL,
4149 .addrconf_vars = { 4114 .addrconf_vars = {
4150 { 4115 {
4151 .ctl_name = NET_IPV6_FORWARDING,
4152 .procname = "forwarding", 4116 .procname = "forwarding",
4153 .data = &ipv6_devconf.forwarding, 4117 .data = &ipv6_devconf.forwarding,
4154 .maxlen = sizeof(int), 4118 .maxlen = sizeof(int),
4155 .mode = 0644, 4119 .mode = 0644,
4156 .proc_handler = addrconf_sysctl_forward, 4120 .proc_handler = addrconf_sysctl_forward,
4157 .strategy = addrconf_sysctl_forward_strategy,
4158 }, 4121 },
4159 { 4122 {
4160 .ctl_name = NET_IPV6_HOP_LIMIT,
4161 .procname = "hop_limit", 4123 .procname = "hop_limit",
4162 .data = &ipv6_devconf.hop_limit, 4124 .data = &ipv6_devconf.hop_limit,
4163 .maxlen = sizeof(int), 4125 .maxlen = sizeof(int),
@@ -4165,7 +4127,6 @@ static struct addrconf_sysctl_table
4165 .proc_handler = proc_dointvec, 4127 .proc_handler = proc_dointvec,
4166 }, 4128 },
4167 { 4129 {
4168 .ctl_name = NET_IPV6_MTU,
4169 .procname = "mtu", 4130 .procname = "mtu",
4170 .data = &ipv6_devconf.mtu6, 4131 .data = &ipv6_devconf.mtu6,
4171 .maxlen = sizeof(int), 4132 .maxlen = sizeof(int),
@@ -4173,7 +4134,6 @@ static struct addrconf_sysctl_table
4173 .proc_handler = proc_dointvec, 4134 .proc_handler = proc_dointvec,
4174 }, 4135 },
4175 { 4136 {
4176 .ctl_name = NET_IPV6_ACCEPT_RA,
4177 .procname = "accept_ra", 4137 .procname = "accept_ra",
4178 .data = &ipv6_devconf.accept_ra, 4138 .data = &ipv6_devconf.accept_ra,
4179 .maxlen = sizeof(int), 4139 .maxlen = sizeof(int),
@@ -4181,7 +4141,6 @@ static struct addrconf_sysctl_table
4181 .proc_handler = proc_dointvec, 4141 .proc_handler = proc_dointvec,
4182 }, 4142 },
4183 { 4143 {
4184 .ctl_name = NET_IPV6_ACCEPT_REDIRECTS,
4185 .procname = "accept_redirects", 4144 .procname = "accept_redirects",
4186 .data = &ipv6_devconf.accept_redirects, 4145 .data = &ipv6_devconf.accept_redirects,
4187 .maxlen = sizeof(int), 4146 .maxlen = sizeof(int),
@@ -4189,7 +4148,6 @@ static struct addrconf_sysctl_table
4189 .proc_handler = proc_dointvec, 4148 .proc_handler = proc_dointvec,
4190 }, 4149 },
4191 { 4150 {
4192 .ctl_name = NET_IPV6_AUTOCONF,
4193 .procname = "autoconf", 4151 .procname = "autoconf",
4194 .data = &ipv6_devconf.autoconf, 4152 .data = &ipv6_devconf.autoconf,
4195 .maxlen = sizeof(int), 4153 .maxlen = sizeof(int),
@@ -4197,7 +4155,6 @@ static struct addrconf_sysctl_table
4197 .proc_handler = proc_dointvec, 4155 .proc_handler = proc_dointvec,
4198 }, 4156 },
4199 { 4157 {
4200 .ctl_name = NET_IPV6_DAD_TRANSMITS,
4201 .procname = "dad_transmits", 4158 .procname = "dad_transmits",
4202 .data = &ipv6_devconf.dad_transmits, 4159 .data = &ipv6_devconf.dad_transmits,
4203 .maxlen = sizeof(int), 4160 .maxlen = sizeof(int),
@@ -4205,7 +4162,6 @@ static struct addrconf_sysctl_table
4205 .proc_handler = proc_dointvec, 4162 .proc_handler = proc_dointvec,
4206 }, 4163 },
4207 { 4164 {
4208 .ctl_name = NET_IPV6_RTR_SOLICITS,
4209 .procname = "router_solicitations", 4165 .procname = "router_solicitations",
4210 .data = &ipv6_devconf.rtr_solicits, 4166 .data = &ipv6_devconf.rtr_solicits,
4211 .maxlen = sizeof(int), 4167 .maxlen = sizeof(int),
@@ -4213,25 +4169,20 @@ static struct addrconf_sysctl_table
4213 .proc_handler = proc_dointvec, 4169 .proc_handler = proc_dointvec,
4214 }, 4170 },
4215 { 4171 {
4216 .ctl_name = NET_IPV6_RTR_SOLICIT_INTERVAL,
4217 .procname = "router_solicitation_interval", 4172 .procname = "router_solicitation_interval",
4218 .data = &ipv6_devconf.rtr_solicit_interval, 4173 .data = &ipv6_devconf.rtr_solicit_interval,
4219 .maxlen = sizeof(int), 4174 .maxlen = sizeof(int),
4220 .mode = 0644, 4175 .mode = 0644,
4221 .proc_handler = proc_dointvec_jiffies, 4176 .proc_handler = proc_dointvec_jiffies,
4222 .strategy = sysctl_jiffies,
4223 }, 4177 },
4224 { 4178 {
4225 .ctl_name = NET_IPV6_RTR_SOLICIT_DELAY,
4226 .procname = "router_solicitation_delay", 4179 .procname = "router_solicitation_delay",
4227 .data = &ipv6_devconf.rtr_solicit_delay, 4180 .data = &ipv6_devconf.rtr_solicit_delay,
4228 .maxlen = sizeof(int), 4181 .maxlen = sizeof(int),
4229 .mode = 0644, 4182 .mode = 0644,
4230 .proc_handler = proc_dointvec_jiffies, 4183 .proc_handler = proc_dointvec_jiffies,
4231 .strategy = sysctl_jiffies,
4232 }, 4184 },
4233 { 4185 {
4234 .ctl_name = NET_IPV6_FORCE_MLD_VERSION,
4235 .procname = "force_mld_version", 4186 .procname = "force_mld_version",
4236 .data = &ipv6_devconf.force_mld_version, 4187 .data = &ipv6_devconf.force_mld_version,
4237 .maxlen = sizeof(int), 4188 .maxlen = sizeof(int),
@@ -4240,7 +4191,6 @@ static struct addrconf_sysctl_table
4240 }, 4191 },
4241#ifdef CONFIG_IPV6_PRIVACY 4192#ifdef CONFIG_IPV6_PRIVACY
4242 { 4193 {
4243 .ctl_name = NET_IPV6_USE_TEMPADDR,
4244 .procname = "use_tempaddr", 4194 .procname = "use_tempaddr",
4245 .data = &ipv6_devconf.use_tempaddr, 4195 .data = &ipv6_devconf.use_tempaddr,
4246 .maxlen = sizeof(int), 4196 .maxlen = sizeof(int),
@@ -4248,7 +4198,6 @@ static struct addrconf_sysctl_table
4248 .proc_handler = proc_dointvec, 4198 .proc_handler = proc_dointvec,
4249 }, 4199 },
4250 { 4200 {
4251 .ctl_name = NET_IPV6_TEMP_VALID_LFT,
4252 .procname = "temp_valid_lft", 4201 .procname = "temp_valid_lft",
4253 .data = &ipv6_devconf.temp_valid_lft, 4202 .data = &ipv6_devconf.temp_valid_lft,
4254 .maxlen = sizeof(int), 4203 .maxlen = sizeof(int),
@@ -4256,7 +4205,6 @@ static struct addrconf_sysctl_table
4256 .proc_handler = proc_dointvec, 4205 .proc_handler = proc_dointvec,
4257 }, 4206 },
4258 { 4207 {
4259 .ctl_name = NET_IPV6_TEMP_PREFERED_LFT,
4260 .procname = "temp_prefered_lft", 4208 .procname = "temp_prefered_lft",
4261 .data = &ipv6_devconf.temp_prefered_lft, 4209 .data = &ipv6_devconf.temp_prefered_lft,
4262 .maxlen = sizeof(int), 4210 .maxlen = sizeof(int),
@@ -4264,7 +4212,6 @@ static struct addrconf_sysctl_table
4264 .proc_handler = proc_dointvec, 4212 .proc_handler = proc_dointvec,
4265 }, 4213 },
4266 { 4214 {
4267 .ctl_name = NET_IPV6_REGEN_MAX_RETRY,
4268 .procname = "regen_max_retry", 4215 .procname = "regen_max_retry",
4269 .data = &ipv6_devconf.regen_max_retry, 4216 .data = &ipv6_devconf.regen_max_retry,
4270 .maxlen = sizeof(int), 4217 .maxlen = sizeof(int),
@@ -4272,7 +4219,6 @@ static struct addrconf_sysctl_table
4272 .proc_handler = proc_dointvec, 4219 .proc_handler = proc_dointvec,
4273 }, 4220 },
4274 { 4221 {
4275 .ctl_name = NET_IPV6_MAX_DESYNC_FACTOR,
4276 .procname = "max_desync_factor", 4222 .procname = "max_desync_factor",
4277 .data = &ipv6_devconf.max_desync_factor, 4223 .data = &ipv6_devconf.max_desync_factor,
4278 .maxlen = sizeof(int), 4224 .maxlen = sizeof(int),
@@ -4281,7 +4227,6 @@ static struct addrconf_sysctl_table
4281 }, 4227 },
4282#endif 4228#endif
4283 { 4229 {
4284 .ctl_name = NET_IPV6_MAX_ADDRESSES,
4285 .procname = "max_addresses", 4230 .procname = "max_addresses",
4286 .data = &ipv6_devconf.max_addresses, 4231 .data = &ipv6_devconf.max_addresses,
4287 .maxlen = sizeof(int), 4232 .maxlen = sizeof(int),
@@ -4289,7 +4234,6 @@ static struct addrconf_sysctl_table
4289 .proc_handler = proc_dointvec, 4234 .proc_handler = proc_dointvec,
4290 }, 4235 },
4291 { 4236 {
4292 .ctl_name = NET_IPV6_ACCEPT_RA_DEFRTR,
4293 .procname = "accept_ra_defrtr", 4237 .procname = "accept_ra_defrtr",
4294 .data = &ipv6_devconf.accept_ra_defrtr, 4238 .data = &ipv6_devconf.accept_ra_defrtr,
4295 .maxlen = sizeof(int), 4239 .maxlen = sizeof(int),
@@ -4297,7 +4241,6 @@ static struct addrconf_sysctl_table
4297 .proc_handler = proc_dointvec, 4241 .proc_handler = proc_dointvec,
4298 }, 4242 },
4299 { 4243 {
4300 .ctl_name = NET_IPV6_ACCEPT_RA_PINFO,
4301 .procname = "accept_ra_pinfo", 4244 .procname = "accept_ra_pinfo",
4302 .data = &ipv6_devconf.accept_ra_pinfo, 4245 .data = &ipv6_devconf.accept_ra_pinfo,
4303 .maxlen = sizeof(int), 4246 .maxlen = sizeof(int),
@@ -4306,7 +4249,6 @@ static struct addrconf_sysctl_table
4306 }, 4249 },
4307#ifdef CONFIG_IPV6_ROUTER_PREF 4250#ifdef CONFIG_IPV6_ROUTER_PREF
4308 { 4251 {
4309 .ctl_name = NET_IPV6_ACCEPT_RA_RTR_PREF,
4310 .procname = "accept_ra_rtr_pref", 4252 .procname = "accept_ra_rtr_pref",
4311 .data = &ipv6_devconf.accept_ra_rtr_pref, 4253 .data = &ipv6_devconf.accept_ra_rtr_pref,
4312 .maxlen = sizeof(int), 4254 .maxlen = sizeof(int),
@@ -4314,17 +4256,14 @@ static struct addrconf_sysctl_table
4314 .proc_handler = proc_dointvec, 4256 .proc_handler = proc_dointvec,
4315 }, 4257 },
4316 { 4258 {
4317 .ctl_name = NET_IPV6_RTR_PROBE_INTERVAL,
4318 .procname = "router_probe_interval", 4259 .procname = "router_probe_interval",
4319 .data = &ipv6_devconf.rtr_probe_interval, 4260 .data = &ipv6_devconf.rtr_probe_interval,
4320 .maxlen = sizeof(int), 4261 .maxlen = sizeof(int),
4321 .mode = 0644, 4262 .mode = 0644,
4322 .proc_handler = proc_dointvec_jiffies, 4263 .proc_handler = proc_dointvec_jiffies,
4323 .strategy = sysctl_jiffies,
4324 }, 4264 },
4325#ifdef CONFIG_IPV6_ROUTE_INFO 4265#ifdef CONFIG_IPV6_ROUTE_INFO
4326 { 4266 {
4327 .ctl_name = NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN,
4328 .procname = "accept_ra_rt_info_max_plen", 4267 .procname = "accept_ra_rt_info_max_plen",
4329 .data = &ipv6_devconf.accept_ra_rt_info_max_plen, 4268 .data = &ipv6_devconf.accept_ra_rt_info_max_plen,
4330 .maxlen = sizeof(int), 4269 .maxlen = sizeof(int),
@@ -4334,7 +4273,6 @@ static struct addrconf_sysctl_table
4334#endif 4273#endif
4335#endif 4274#endif
4336 { 4275 {
4337 .ctl_name = NET_IPV6_PROXY_NDP,
4338 .procname = "proxy_ndp", 4276 .procname = "proxy_ndp",
4339 .data = &ipv6_devconf.proxy_ndp, 4277 .data = &ipv6_devconf.proxy_ndp,
4340 .maxlen = sizeof(int), 4278 .maxlen = sizeof(int),
@@ -4342,7 +4280,6 @@ static struct addrconf_sysctl_table
4342 .proc_handler = proc_dointvec, 4280 .proc_handler = proc_dointvec,
4343 }, 4281 },
4344 { 4282 {
4345 .ctl_name = NET_IPV6_ACCEPT_SOURCE_ROUTE,
4346 .procname = "accept_source_route", 4283 .procname = "accept_source_route",
4347 .data = &ipv6_devconf.accept_source_route, 4284 .data = &ipv6_devconf.accept_source_route,
4348 .maxlen = sizeof(int), 4285 .maxlen = sizeof(int),
@@ -4351,7 +4288,6 @@ static struct addrconf_sysctl_table
4351 }, 4288 },
4352#ifdef CONFIG_IPV6_OPTIMISTIC_DAD 4289#ifdef CONFIG_IPV6_OPTIMISTIC_DAD
4353 { 4290 {
4354 .ctl_name = CTL_UNNUMBERED,
4355 .procname = "optimistic_dad", 4291 .procname = "optimistic_dad",
4356 .data = &ipv6_devconf.optimistic_dad, 4292 .data = &ipv6_devconf.optimistic_dad,
4357 .maxlen = sizeof(int), 4293 .maxlen = sizeof(int),
@@ -4362,7 +4298,6 @@ static struct addrconf_sysctl_table
4362#endif 4298#endif
4363#ifdef CONFIG_IPV6_MROUTE 4299#ifdef CONFIG_IPV6_MROUTE
4364 { 4300 {
4365 .ctl_name = CTL_UNNUMBERED,
4366 .procname = "mc_forwarding", 4301 .procname = "mc_forwarding",
4367 .data = &ipv6_devconf.mc_forwarding, 4302 .data = &ipv6_devconf.mc_forwarding,
4368 .maxlen = sizeof(int), 4303 .maxlen = sizeof(int),
@@ -4371,16 +4306,13 @@ static struct addrconf_sysctl_table
4371 }, 4306 },
4372#endif 4307#endif
4373 { 4308 {
4374 .ctl_name = CTL_UNNUMBERED,
4375 .procname = "disable_ipv6", 4309 .procname = "disable_ipv6",
4376 .data = &ipv6_devconf.disable_ipv6, 4310 .data = &ipv6_devconf.disable_ipv6,
4377 .maxlen = sizeof(int), 4311 .maxlen = sizeof(int),
4378 .mode = 0644, 4312 .mode = 0644,
4379 .proc_handler = addrconf_sysctl_disable, 4313 .proc_handler = addrconf_sysctl_disable,
4380 .strategy = sysctl_intvec,
4381 }, 4314 },
4382 { 4315 {
4383 .ctl_name = CTL_UNNUMBERED,
4384 .procname = "accept_dad", 4316 .procname = "accept_dad",
4385 .data = &ipv6_devconf.accept_dad, 4317 .data = &ipv6_devconf.accept_dad,
4386 .maxlen = sizeof(int), 4318 .maxlen = sizeof(int),
@@ -4388,7 +4320,6 @@ static struct addrconf_sysctl_table
4388 .proc_handler = proc_dointvec, 4320 .proc_handler = proc_dointvec,
4389 }, 4321 },
4390 { 4322 {
4391 .ctl_name = CTL_UNNUMBERED,
4392 .procname = "force_tllao", 4323 .procname = "force_tllao",
4393 .data = &ipv6_devconf.force_tllao, 4324 .data = &ipv6_devconf.force_tllao,
4394 .maxlen = sizeof(int), 4325 .maxlen = sizeof(int),
@@ -4396,13 +4327,13 @@ static struct addrconf_sysctl_table
4396 .proc_handler = proc_dointvec 4327 .proc_handler = proc_dointvec
4397 }, 4328 },
4398 { 4329 {
4399 .ctl_name = 0, /* sentinel */ 4330 /* sentinel */
4400 } 4331 }
4401 }, 4332 },
4402}; 4333};
4403 4334
4404static int __addrconf_sysctl_register(struct net *net, char *dev_name, 4335static int __addrconf_sysctl_register(struct net *net, char *dev_name,
4405 int ctl_name, struct inet6_dev *idev, struct ipv6_devconf *p) 4336 struct inet6_dev *idev, struct ipv6_devconf *p)
4406{ 4337{
4407 int i; 4338 int i;
4408 struct addrconf_sysctl_table *t; 4339 struct addrconf_sysctl_table *t;
@@ -4410,9 +4341,9 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name,
4410#define ADDRCONF_CTL_PATH_DEV 3 4341#define ADDRCONF_CTL_PATH_DEV 3
4411 4342
4412 struct ctl_path addrconf_ctl_path[] = { 4343 struct ctl_path addrconf_ctl_path[] = {
4413 { .procname = "net", .ctl_name = CTL_NET, }, 4344 { .procname = "net", },
4414 { .procname = "ipv6", .ctl_name = NET_IPV6, }, 4345 { .procname = "ipv6", },
4415 { .procname = "conf", .ctl_name = NET_IPV6_CONF, }, 4346 { .procname = "conf", },
4416 { /* to be set */ }, 4347 { /* to be set */ },
4417 { }, 4348 { },
4418 }; 4349 };
@@ -4438,7 +4369,6 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name,
4438 goto free; 4369 goto free;
4439 4370
4440 addrconf_ctl_path[ADDRCONF_CTL_PATH_DEV].procname = t->dev_name; 4371 addrconf_ctl_path[ADDRCONF_CTL_PATH_DEV].procname = t->dev_name;
4441 addrconf_ctl_path[ADDRCONF_CTL_PATH_DEV].ctl_name = ctl_name;
4442 4372
4443 t->sysctl_header = register_net_sysctl_table(net, addrconf_ctl_path, 4373 t->sysctl_header = register_net_sysctl_table(net, addrconf_ctl_path,
4444 t->addrconf_vars); 4374 t->addrconf_vars);
@@ -4474,10 +4404,9 @@ static void addrconf_sysctl_register(struct inet6_dev *idev)
4474{ 4404{
4475 neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, 4405 neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6,
4476 NET_IPV6_NEIGH, "ipv6", 4406 NET_IPV6_NEIGH, "ipv6",
4477 &ndisc_ifinfo_sysctl_change, 4407 &ndisc_ifinfo_sysctl_change);
4478 ndisc_ifinfo_sysctl_strategy);
4479 __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, 4408 __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name,
4480 idev->dev->ifindex, idev, &idev->cnf); 4409 idev, &idev->cnf);
4481} 4410}
4482 4411
4483static void addrconf_sysctl_unregister(struct inet6_dev *idev) 4412static void addrconf_sysctl_unregister(struct inet6_dev *idev)
@@ -4516,13 +4445,11 @@ static int addrconf_init_net(struct net *net)
4516 net->ipv6.devconf_dflt = dflt; 4445 net->ipv6.devconf_dflt = dflt;
4517 4446
4518#ifdef CONFIG_SYSCTL 4447#ifdef CONFIG_SYSCTL
4519 err = __addrconf_sysctl_register(net, "all", NET_PROTO_CONF_ALL, 4448 err = __addrconf_sysctl_register(net, "all", NULL, all);
4520 NULL, all);
4521 if (err < 0) 4449 if (err < 0)
4522 goto err_reg_all; 4450 goto err_reg_all;
4523 4451
4524 err = __addrconf_sysctl_register(net, "default", NET_PROTO_CONF_DEFAULT, 4452 err = __addrconf_sysctl_register(net, "default", NULL, dflt);
4525 NULL, dflt);
4526 if (err < 0) 4453 if (err < 0)
4527 goto err_reg_dflt; 4454 goto err_reg_dflt;
4528#endif 4455#endif
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index f23ebbec0631..4ae661bc3677 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -942,15 +942,13 @@ EXPORT_SYMBOL(icmpv6_err_convert);
942#ifdef CONFIG_SYSCTL 942#ifdef CONFIG_SYSCTL
943ctl_table ipv6_icmp_table_template[] = { 943ctl_table ipv6_icmp_table_template[] = {
944 { 944 {
945 .ctl_name = NET_IPV6_ICMP_RATELIMIT,
946 .procname = "ratelimit", 945 .procname = "ratelimit",
947 .data = &init_net.ipv6.sysctl.icmpv6_time, 946 .data = &init_net.ipv6.sysctl.icmpv6_time,
948 .maxlen = sizeof(int), 947 .maxlen = sizeof(int),
949 .mode = 0644, 948 .mode = 0644,
950 .proc_handler = proc_dointvec_ms_jiffies, 949 .proc_handler = proc_dointvec_ms_jiffies,
951 .strategy = sysctl_ms_jiffies
952 }, 950 },
953 { .ctl_name = 0 }, 951 { },
954}; 952};
955 953
956struct ctl_table *ipv6_icmp_sysctl_init(struct net *net) 954struct ctl_table *ipv6_icmp_sysctl_init(struct net *net)
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 3507cfe1e7a2..c45852798092 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1769,42 +1769,6 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void __user *bu
1769 return ret; 1769 return ret;
1770} 1770}
1771 1771
1772int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl,
1773 void __user *oldval, size_t __user *oldlenp,
1774 void __user *newval, size_t newlen)
1775{
1776 struct net_device *dev = ctl->extra1;
1777 struct inet6_dev *idev;
1778 int ret;
1779
1780 if (ctl->ctl_name == NET_NEIGH_RETRANS_TIME ||
1781 ctl->ctl_name == NET_NEIGH_REACHABLE_TIME)
1782 ndisc_warn_deprecated_sysctl(ctl, "procfs", dev ? dev->name : "default");
1783
1784 switch (ctl->ctl_name) {
1785 case NET_NEIGH_REACHABLE_TIME:
1786 ret = sysctl_jiffies(ctl, oldval, oldlenp, newval, newlen);
1787 break;
1788 case NET_NEIGH_RETRANS_TIME_MS:
1789 case NET_NEIGH_REACHABLE_TIME_MS:
1790 ret = sysctl_ms_jiffies(ctl, oldval, oldlenp, newval, newlen);
1791 break;
1792 default:
1793 ret = 0;
1794 }
1795
1796 if (newval && newlen && ret > 0 &&
1797 dev && (idev = in6_dev_get(dev)) != NULL) {
1798 if (ctl->ctl_name == NET_NEIGH_REACHABLE_TIME ||
1799 ctl->ctl_name == NET_NEIGH_REACHABLE_TIME_MS)
1800 idev->nd_parms->reachable_time = neigh_rand_reach_time(idev->nd_parms->base_reachable_time);
1801 idev->tstamp = jiffies;
1802 inet6_ifinfo_notify(RTM_NEWLINK, idev);
1803 in6_dev_put(idev);
1804 }
1805
1806 return ret;
1807}
1808 1772
1809#endif 1773#endif
1810 1774
@@ -1858,8 +1822,7 @@ int __init ndisc_init(void)
1858#ifdef CONFIG_SYSCTL 1822#ifdef CONFIG_SYSCTL
1859 err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, 1823 err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6,
1860 NET_IPV6_NEIGH, "ipv6", 1824 NET_IPV6_NEIGH, "ipv6",
1861 &ndisc_ifinfo_sysctl_change, 1825 &ndisc_ifinfo_sysctl_change);
1862 &ndisc_ifinfo_sysctl_strategy);
1863 if (err) 1826 if (err)
1864 goto out_unregister_pernet; 1827 goto out_unregister_pernet;
1865#endif 1828#endif
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index db4d5725cce8..7854052be60b 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -36,7 +36,6 @@
36 36
37#define IPQ_QMAX_DEFAULT 1024 37#define IPQ_QMAX_DEFAULT 1024
38#define IPQ_PROC_FS_NAME "ip6_queue" 38#define IPQ_PROC_FS_NAME "ip6_queue"
39#define NET_IPQ_QMAX 2088
40#define NET_IPQ_QMAX_NAME "ip6_queue_maxlen" 39#define NET_IPQ_QMAX_NAME "ip6_queue_maxlen"
41 40
42typedef int (*ipq_cmpfn)(struct nf_queue_entry *, unsigned long); 41typedef int (*ipq_cmpfn)(struct nf_queue_entry *, unsigned long);
@@ -517,14 +516,13 @@ static struct ctl_table_header *ipq_sysctl_header;
517 516
518static ctl_table ipq_table[] = { 517static ctl_table ipq_table[] = {
519 { 518 {
520 .ctl_name = NET_IPQ_QMAX,
521 .procname = NET_IPQ_QMAX_NAME, 519 .procname = NET_IPQ_QMAX_NAME,
522 .data = &queue_maxlen, 520 .data = &queue_maxlen,
523 .maxlen = sizeof(queue_maxlen), 521 .maxlen = sizeof(queue_maxlen),
524 .mode = 0644, 522 .mode = 0644,
525 .proc_handler = proc_dointvec 523 .proc_handler = proc_dointvec
526 }, 524 },
527 { .ctl_name = 0 } 525 { }
528}; 526};
529#endif 527#endif
530 528
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
index 0f3df45718ac..c7b8bd1d7984 100644
--- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
@@ -277,9 +277,7 @@ static struct ctl_table icmpv6_sysctl_table[] = {
277 .mode = 0644, 277 .mode = 0644,
278 .proc_handler = proc_dointvec_jiffies, 278 .proc_handler = proc_dointvec_jiffies,
279 }, 279 },
280 { 280 { }
281 .ctl_name = 0
282 }
283}; 281};
284#endif /* CONFIG_SYSCTL */ 282#endif /* CONFIG_SYSCTL */
285 283
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index f3aba255ad9f..e0b9424fa1b2 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -83,7 +83,6 @@ struct ctl_table nf_ct_ipv6_sysctl_table[] = {
83 .proc_handler = proc_dointvec_jiffies, 83 .proc_handler = proc_dointvec_jiffies,
84 }, 84 },
85 { 85 {
86 .ctl_name = NET_NF_CONNTRACK_FRAG6_LOW_THRESH,
87 .procname = "nf_conntrack_frag6_low_thresh", 86 .procname = "nf_conntrack_frag6_low_thresh",
88 .data = &nf_init_frags.low_thresh, 87 .data = &nf_init_frags.low_thresh,
89 .maxlen = sizeof(unsigned int), 88 .maxlen = sizeof(unsigned int),
@@ -91,14 +90,13 @@ struct ctl_table nf_ct_ipv6_sysctl_table[] = {
91 .proc_handler = proc_dointvec, 90 .proc_handler = proc_dointvec,
92 }, 91 },
93 { 92 {
94 .ctl_name = NET_NF_CONNTRACK_FRAG6_HIGH_THRESH,
95 .procname = "nf_conntrack_frag6_high_thresh", 93 .procname = "nf_conntrack_frag6_high_thresh",
96 .data = &nf_init_frags.high_thresh, 94 .data = &nf_init_frags.high_thresh,
97 .maxlen = sizeof(unsigned int), 95 .maxlen = sizeof(unsigned int),
98 .mode = 0644, 96 .mode = 0644,
99 .proc_handler = proc_dointvec, 97 .proc_handler = proc_dointvec,
100 }, 98 },
101 { .ctl_name = 0 } 99 { }
102}; 100};
103#endif 101#endif
104 102
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 45efc39753e2..4d98549a6868 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -635,7 +635,6 @@ static const struct inet6_protocol frag_protocol =
635#ifdef CONFIG_SYSCTL 635#ifdef CONFIG_SYSCTL
636static struct ctl_table ip6_frags_ns_ctl_table[] = { 636static struct ctl_table ip6_frags_ns_ctl_table[] = {
637 { 637 {
638 .ctl_name = NET_IPV6_IP6FRAG_HIGH_THRESH,
639 .procname = "ip6frag_high_thresh", 638 .procname = "ip6frag_high_thresh",
640 .data = &init_net.ipv6.frags.high_thresh, 639 .data = &init_net.ipv6.frags.high_thresh,
641 .maxlen = sizeof(int), 640 .maxlen = sizeof(int),
@@ -643,7 +642,6 @@ static struct ctl_table ip6_frags_ns_ctl_table[] = {
643 .proc_handler = proc_dointvec 642 .proc_handler = proc_dointvec
644 }, 643 },
645 { 644 {
646 .ctl_name = NET_IPV6_IP6FRAG_LOW_THRESH,
647 .procname = "ip6frag_low_thresh", 645 .procname = "ip6frag_low_thresh",
648 .data = &init_net.ipv6.frags.low_thresh, 646 .data = &init_net.ipv6.frags.low_thresh,
649 .maxlen = sizeof(int), 647 .maxlen = sizeof(int),
@@ -651,26 +649,22 @@ static struct ctl_table ip6_frags_ns_ctl_table[] = {
651 .proc_handler = proc_dointvec 649 .proc_handler = proc_dointvec
652 }, 650 },
653 { 651 {
654 .ctl_name = NET_IPV6_IP6FRAG_TIME,
655 .procname = "ip6frag_time", 652 .procname = "ip6frag_time",
656 .data = &init_net.ipv6.frags.timeout, 653 .data = &init_net.ipv6.frags.timeout,
657 .maxlen = sizeof(int), 654 .maxlen = sizeof(int),
658 .mode = 0644, 655 .mode = 0644,
659 .proc_handler = proc_dointvec_jiffies, 656 .proc_handler = proc_dointvec_jiffies,
660 .strategy = sysctl_jiffies,
661 }, 657 },
662 { } 658 { }
663}; 659};
664 660
665static struct ctl_table ip6_frags_ctl_table[] = { 661static struct ctl_table ip6_frags_ctl_table[] = {
666 { 662 {
667 .ctl_name = NET_IPV6_IP6FRAG_SECRET_INTERVAL,
668 .procname = "ip6frag_secret_interval", 663 .procname = "ip6frag_secret_interval",
669 .data = &ip6_frags.secret_interval, 664 .data = &ip6_frags.secret_interval,
670 .maxlen = sizeof(int), 665 .maxlen = sizeof(int),
671 .mode = 0644, 666 .mode = 0644,
672 .proc_handler = proc_dointvec_jiffies, 667 .proc_handler = proc_dointvec_jiffies,
673 .strategy = sysctl_jiffies
674 }, 668 },
675 { } 669 { }
676}; 670};
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index df9432a46ffc..db3b27303890 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2547,7 +2547,6 @@ ctl_table ipv6_route_table_template[] = {
2547 .proc_handler = ipv6_sysctl_rtcache_flush 2547 .proc_handler = ipv6_sysctl_rtcache_flush
2548 }, 2548 },
2549 { 2549 {
2550 .ctl_name = NET_IPV6_ROUTE_GC_THRESH,
2551 .procname = "gc_thresh", 2550 .procname = "gc_thresh",
2552 .data = &ip6_dst_ops_template.gc_thresh, 2551 .data = &ip6_dst_ops_template.gc_thresh,
2553 .maxlen = sizeof(int), 2552 .maxlen = sizeof(int),
@@ -2555,7 +2554,6 @@ ctl_table ipv6_route_table_template[] = {
2555 .proc_handler = proc_dointvec, 2554 .proc_handler = proc_dointvec,
2556 }, 2555 },
2557 { 2556 {
2558 .ctl_name = NET_IPV6_ROUTE_MAX_SIZE,
2559 .procname = "max_size", 2557 .procname = "max_size",
2560 .data = &init_net.ipv6.sysctl.ip6_rt_max_size, 2558 .data = &init_net.ipv6.sysctl.ip6_rt_max_size,
2561 .maxlen = sizeof(int), 2559 .maxlen = sizeof(int),
@@ -2563,69 +2561,55 @@ ctl_table ipv6_route_table_template[] = {
2563 .proc_handler = proc_dointvec, 2561 .proc_handler = proc_dointvec,
2564 }, 2562 },
2565 { 2563 {
2566 .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL,
2567 .procname = "gc_min_interval", 2564 .procname = "gc_min_interval",
2568 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval, 2565 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval,
2569 .maxlen = sizeof(int), 2566 .maxlen = sizeof(int),
2570 .mode = 0644, 2567 .mode = 0644,
2571 .proc_handler = proc_dointvec_jiffies, 2568 .proc_handler = proc_dointvec_jiffies,
2572 .strategy = sysctl_jiffies,
2573 }, 2569 },
2574 { 2570 {
2575 .ctl_name = NET_IPV6_ROUTE_GC_TIMEOUT,
2576 .procname = "gc_timeout", 2571 .procname = "gc_timeout",
2577 .data = &init_net.ipv6.sysctl.ip6_rt_gc_timeout, 2572 .data = &init_net.ipv6.sysctl.ip6_rt_gc_timeout,
2578 .maxlen = sizeof(int), 2573 .maxlen = sizeof(int),
2579 .mode = 0644, 2574 .mode = 0644,
2580 .proc_handler = proc_dointvec_jiffies, 2575 .proc_handler = proc_dointvec_jiffies,
2581 .strategy = sysctl_jiffies,
2582 }, 2576 },
2583 { 2577 {
2584 .ctl_name = NET_IPV6_ROUTE_GC_INTERVAL,
2585 .procname = "gc_interval", 2578 .procname = "gc_interval",
2586 .data = &init_net.ipv6.sysctl.ip6_rt_gc_interval, 2579 .data = &init_net.ipv6.sysctl.ip6_rt_gc_interval,
2587 .maxlen = sizeof(int), 2580 .maxlen = sizeof(int),
2588 .mode = 0644, 2581 .mode = 0644,
2589 .proc_handler = proc_dointvec_jiffies, 2582 .proc_handler = proc_dointvec_jiffies,
2590 .strategy = sysctl_jiffies,
2591 }, 2583 },
2592 { 2584 {
2593 .ctl_name = NET_IPV6_ROUTE_GC_ELASTICITY,
2594 .procname = "gc_elasticity", 2585 .procname = "gc_elasticity",
2595 .data = &init_net.ipv6.sysctl.ip6_rt_gc_elasticity, 2586 .data = &init_net.ipv6.sysctl.ip6_rt_gc_elasticity,
2596 .maxlen = sizeof(int), 2587 .maxlen = sizeof(int),
2597 .mode = 0644, 2588 .mode = 0644,
2598 .proc_handler = proc_dointvec_jiffies, 2589 .proc_handler = proc_dointvec_jiffies,
2599 .strategy = sysctl_jiffies,
2600 }, 2590 },
2601 { 2591 {
2602 .ctl_name = NET_IPV6_ROUTE_MTU_EXPIRES,
2603 .procname = "mtu_expires", 2592 .procname = "mtu_expires",
2604 .data = &init_net.ipv6.sysctl.ip6_rt_mtu_expires, 2593 .data = &init_net.ipv6.sysctl.ip6_rt_mtu_expires,
2605 .maxlen = sizeof(int), 2594 .maxlen = sizeof(int),
2606 .mode = 0644, 2595 .mode = 0644,
2607 .proc_handler = proc_dointvec_jiffies, 2596 .proc_handler = proc_dointvec_jiffies,
2608 .strategy = sysctl_jiffies,
2609 }, 2597 },
2610 { 2598 {
2611 .ctl_name = NET_IPV6_ROUTE_MIN_ADVMSS,
2612 .procname = "min_adv_mss", 2599 .procname = "min_adv_mss",
2613 .data = &init_net.ipv6.sysctl.ip6_rt_min_advmss, 2600 .data = &init_net.ipv6.sysctl.ip6_rt_min_advmss,
2614 .maxlen = sizeof(int), 2601 .maxlen = sizeof(int),
2615 .mode = 0644, 2602 .mode = 0644,
2616 .proc_handler = proc_dointvec_jiffies, 2603 .proc_handler = proc_dointvec_jiffies,
2617 .strategy = sysctl_jiffies,
2618 }, 2604 },
2619 { 2605 {
2620 .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS,
2621 .procname = "gc_min_interval_ms", 2606 .procname = "gc_min_interval_ms",
2622 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval, 2607 .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval,
2623 .maxlen = sizeof(int), 2608 .maxlen = sizeof(int),
2624 .mode = 0644, 2609 .mode = 0644,
2625 .proc_handler = proc_dointvec_ms_jiffies, 2610 .proc_handler = proc_dointvec_ms_jiffies,
2626 .strategy = sysctl_ms_jiffies,
2627 }, 2611 },
2628 { .ctl_name = 0 } 2612 { }
2629}; 2613};
2630 2614
2631struct ctl_table *ipv6_route_sysctl_init(struct net *net) 2615struct ctl_table *ipv6_route_sysctl_init(struct net *net)
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index 0dc6a4e5ed4a..c690736885b4 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -16,45 +16,41 @@
16 16
17static ctl_table ipv6_table_template[] = { 17static ctl_table ipv6_table_template[] = {
18 { 18 {
19 .ctl_name = NET_IPV6_ROUTE,
20 .procname = "route", 19 .procname = "route",
21 .maxlen = 0, 20 .maxlen = 0,
22 .mode = 0555, 21 .mode = 0555,
23 .child = ipv6_route_table_template 22 .child = ipv6_route_table_template
24 }, 23 },
25 { 24 {
26 .ctl_name = NET_IPV6_ICMP,
27 .procname = "icmp", 25 .procname = "icmp",
28 .maxlen = 0, 26 .maxlen = 0,
29 .mode = 0555, 27 .mode = 0555,
30 .child = ipv6_icmp_table_template 28 .child = ipv6_icmp_table_template
31 }, 29 },
32 { 30 {
33 .ctl_name = NET_IPV6_BINDV6ONLY,
34 .procname = "bindv6only", 31 .procname = "bindv6only",
35 .data = &init_net.ipv6.sysctl.bindv6only, 32 .data = &init_net.ipv6.sysctl.bindv6only,
36 .maxlen = sizeof(int), 33 .maxlen = sizeof(int),
37 .mode = 0644, 34 .mode = 0644,
38 .proc_handler = proc_dointvec 35 .proc_handler = proc_dointvec
39 }, 36 },
40 { .ctl_name = 0 } 37 { }
41}; 38};
42 39
43static ctl_table ipv6_rotable[] = { 40static ctl_table ipv6_rotable[] = {
44 { 41 {
45 .ctl_name = NET_IPV6_MLD_MAX_MSF,
46 .procname = "mld_max_msf", 42 .procname = "mld_max_msf",
47 .data = &sysctl_mld_max_msf, 43 .data = &sysctl_mld_max_msf,
48 .maxlen = sizeof(int), 44 .maxlen = sizeof(int),
49 .mode = 0644, 45 .mode = 0644,
50 .proc_handler = proc_dointvec 46 .proc_handler = proc_dointvec
51 }, 47 },
52 { .ctl_name = 0 } 48 { }
53}; 49};
54 50
55struct ctl_path net_ipv6_ctl_path[] = { 51struct ctl_path net_ipv6_ctl_path[] = {
56 { .procname = "net", .ctl_name = CTL_NET, }, 52 { .procname = "net", },
57 { .procname = "ipv6", .ctl_name = NET_IPV6, }, 53 { .procname = "ipv6", },
58 { }, 54 { },
59}; 55};
60EXPORT_SYMBOL_GPL(net_ipv6_ctl_path); 56EXPORT_SYMBOL_GPL(net_ipv6_ctl_path);
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 8ec3d45cd1d9..7254e3f899a7 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -309,7 +309,6 @@ static void xfrm6_policy_fini(void)
309#ifdef CONFIG_SYSCTL 309#ifdef CONFIG_SYSCTL
310static struct ctl_table xfrm6_policy_table[] = { 310static struct ctl_table xfrm6_policy_table[] = {
311 { 311 {
312 .ctl_name = CTL_UNNUMBERED,
313 .procname = "xfrm6_gc_thresh", 312 .procname = "xfrm6_gc_thresh",
314 .data = &xfrm6_dst_ops.gc_thresh, 313 .data = &xfrm6_dst_ops.gc_thresh,
315 .maxlen = sizeof(int), 314 .maxlen = sizeof(int),
diff --git a/net/ipx/sysctl_net_ipx.c b/net/ipx/sysctl_net_ipx.c
index 633fcab35580..bd6dca00fb85 100644
--- a/net/ipx/sysctl_net_ipx.c
+++ b/net/ipx/sysctl_net_ipx.c
@@ -18,19 +18,18 @@ extern int sysctl_ipx_pprop_broadcasting;
18 18
19static struct ctl_table ipx_table[] = { 19static struct ctl_table ipx_table[] = {
20 { 20 {
21 .ctl_name = NET_IPX_PPROP_BROADCASTING,
22 .procname = "ipx_pprop_broadcasting", 21 .procname = "ipx_pprop_broadcasting",
23 .data = &sysctl_ipx_pprop_broadcasting, 22 .data = &sysctl_ipx_pprop_broadcasting,
24 .maxlen = sizeof(int), 23 .maxlen = sizeof(int),
25 .mode = 0644, 24 .mode = 0644,
26 .proc_handler = proc_dointvec, 25 .proc_handler = proc_dointvec,
27 }, 26 },
28 { 0 }, 27 { },
29}; 28};
30 29
31static struct ctl_path ipx_path[] = { 30static struct ctl_path ipx_path[] = {
32 { .procname = "net", .ctl_name = CTL_NET, }, 31 { .procname = "net", },
33 { .procname = "ipx", .ctl_name = NET_IPX, }, 32 { .procname = "ipx", },
34 { } 33 { }
35}; 34};
36 35
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c
index 5c86567e5a78..d0b70dadf73b 100644
--- a/net/irda/irsysctl.c
+++ b/net/irda/irsysctl.c
@@ -113,26 +113,21 @@ static int do_discovery(ctl_table *table, int write,
113/* One file */ 113/* One file */
114static ctl_table irda_table[] = { 114static ctl_table irda_table[] = {
115 { 115 {
116 .ctl_name = NET_IRDA_DISCOVERY,
117 .procname = "discovery", 116 .procname = "discovery",
118 .data = &sysctl_discovery, 117 .data = &sysctl_discovery,
119 .maxlen = sizeof(int), 118 .maxlen = sizeof(int),
120 .mode = 0644, 119 .mode = 0644,
121 .proc_handler = do_discovery, 120 .proc_handler = do_discovery,
122 .strategy = sysctl_intvec
123 }, 121 },
124 { 122 {
125 .ctl_name = NET_IRDA_DEVNAME,
126 .procname = "devname", 123 .procname = "devname",
127 .data = sysctl_devname, 124 .data = sysctl_devname,
128 .maxlen = 65, 125 .maxlen = 65,
129 .mode = 0644, 126 .mode = 0644,
130 .proc_handler = do_devname, 127 .proc_handler = do_devname,
131 .strategy = sysctl_string
132 }, 128 },
133#ifdef CONFIG_IRDA_DEBUG 129#ifdef CONFIG_IRDA_DEBUG
134 { 130 {
135 .ctl_name = NET_IRDA_DEBUG,
136 .procname = "debug", 131 .procname = "debug",
137 .data = &irda_debug, 132 .data = &irda_debug,
138 .maxlen = sizeof(int), 133 .maxlen = sizeof(int),
@@ -142,7 +137,6 @@ static ctl_table irda_table[] = {
142#endif 137#endif
143#ifdef CONFIG_IRDA_FAST_RR 138#ifdef CONFIG_IRDA_FAST_RR
144 { 139 {
145 .ctl_name = NET_IRDA_FAST_POLL,
146 .procname = "fast_poll_increase", 140 .procname = "fast_poll_increase",
147 .data = &sysctl_fast_poll_increase, 141 .data = &sysctl_fast_poll_increase,
148 .maxlen = sizeof(int), 142 .maxlen = sizeof(int),
@@ -151,18 +145,15 @@ static ctl_table irda_table[] = {
151 }, 145 },
152#endif 146#endif
153 { 147 {
154 .ctl_name = NET_IRDA_DISCOVERY_SLOTS,
155 .procname = "discovery_slots", 148 .procname = "discovery_slots",
156 .data = &sysctl_discovery_slots, 149 .data = &sysctl_discovery_slots,
157 .maxlen = sizeof(int), 150 .maxlen = sizeof(int),
158 .mode = 0644, 151 .mode = 0644,
159 .proc_handler = proc_dointvec_minmax, 152 .proc_handler = proc_dointvec_minmax,
160 .strategy = sysctl_intvec,
161 .extra1 = &min_discovery_slots, 153 .extra1 = &min_discovery_slots,
162 .extra2 = &max_discovery_slots 154 .extra2 = &max_discovery_slots
163 }, 155 },
164 { 156 {
165 .ctl_name = NET_IRDA_DISCOVERY_TIMEOUT,
166 .procname = "discovery_timeout", 157 .procname = "discovery_timeout",
167 .data = &sysctl_discovery_timeout, 158 .data = &sysctl_discovery_timeout,
168 .maxlen = sizeof(int), 159 .maxlen = sizeof(int),
@@ -170,99 +161,83 @@ static ctl_table irda_table[] = {
170 .proc_handler = proc_dointvec 161 .proc_handler = proc_dointvec
171 }, 162 },
172 { 163 {
173 .ctl_name = NET_IRDA_SLOT_TIMEOUT,
174 .procname = "slot_timeout", 164 .procname = "slot_timeout",
175 .data = &sysctl_slot_timeout, 165 .data = &sysctl_slot_timeout,
176 .maxlen = sizeof(int), 166 .maxlen = sizeof(int),
177 .mode = 0644, 167 .mode = 0644,
178 .proc_handler = proc_dointvec_minmax, 168 .proc_handler = proc_dointvec_minmax,
179 .strategy = sysctl_intvec,
180 .extra1 = &min_slot_timeout, 169 .extra1 = &min_slot_timeout,
181 .extra2 = &max_slot_timeout 170 .extra2 = &max_slot_timeout
182 }, 171 },
183 { 172 {
184 .ctl_name = NET_IRDA_MAX_BAUD_RATE,
185 .procname = "max_baud_rate", 173 .procname = "max_baud_rate",
186 .data = &sysctl_max_baud_rate, 174 .data = &sysctl_max_baud_rate,
187 .maxlen = sizeof(int), 175 .maxlen = sizeof(int),
188 .mode = 0644, 176 .mode = 0644,
189 .proc_handler = proc_dointvec_minmax, 177 .proc_handler = proc_dointvec_minmax,
190 .strategy = sysctl_intvec,
191 .extra1 = &min_max_baud_rate, 178 .extra1 = &min_max_baud_rate,
192 .extra2 = &max_max_baud_rate 179 .extra2 = &max_max_baud_rate
193 }, 180 },
194 { 181 {
195 .ctl_name = NET_IRDA_MIN_TX_TURN_TIME,
196 .procname = "min_tx_turn_time", 182 .procname = "min_tx_turn_time",
197 .data = &sysctl_min_tx_turn_time, 183 .data = &sysctl_min_tx_turn_time,
198 .maxlen = sizeof(int), 184 .maxlen = sizeof(int),
199 .mode = 0644, 185 .mode = 0644,
200 .proc_handler = proc_dointvec_minmax, 186 .proc_handler = proc_dointvec_minmax,
201 .strategy = sysctl_intvec,
202 .extra1 = &min_min_tx_turn_time, 187 .extra1 = &min_min_tx_turn_time,
203 .extra2 = &max_min_tx_turn_time 188 .extra2 = &max_min_tx_turn_time
204 }, 189 },
205 { 190 {
206 .ctl_name = NET_IRDA_MAX_TX_DATA_SIZE,
207 .procname = "max_tx_data_size", 191 .procname = "max_tx_data_size",
208 .data = &sysctl_max_tx_data_size, 192 .data = &sysctl_max_tx_data_size,
209 .maxlen = sizeof(int), 193 .maxlen = sizeof(int),
210 .mode = 0644, 194 .mode = 0644,
211 .proc_handler = proc_dointvec_minmax, 195 .proc_handler = proc_dointvec_minmax,
212 .strategy = sysctl_intvec,
213 .extra1 = &min_max_tx_data_size, 196 .extra1 = &min_max_tx_data_size,
214 .extra2 = &max_max_tx_data_size 197 .extra2 = &max_max_tx_data_size
215 }, 198 },
216 { 199 {
217 .ctl_name = NET_IRDA_MAX_TX_WINDOW,
218 .procname = "max_tx_window", 200 .procname = "max_tx_window",
219 .data = &sysctl_max_tx_window, 201 .data = &sysctl_max_tx_window,
220 .maxlen = sizeof(int), 202 .maxlen = sizeof(int),
221 .mode = 0644, 203 .mode = 0644,
222 .proc_handler = proc_dointvec_minmax, 204 .proc_handler = proc_dointvec_minmax,
223 .strategy = sysctl_intvec,
224 .extra1 = &min_max_tx_window, 205 .extra1 = &min_max_tx_window,
225 .extra2 = &max_max_tx_window 206 .extra2 = &max_max_tx_window
226 }, 207 },
227 { 208 {
228 .ctl_name = NET_IRDA_MAX_NOREPLY_TIME,
229 .procname = "max_noreply_time", 209 .procname = "max_noreply_time",
230 .data = &sysctl_max_noreply_time, 210 .data = &sysctl_max_noreply_time,
231 .maxlen = sizeof(int), 211 .maxlen = sizeof(int),
232 .mode = 0644, 212 .mode = 0644,
233 .proc_handler = proc_dointvec_minmax, 213 .proc_handler = proc_dointvec_minmax,
234 .strategy = sysctl_intvec,
235 .extra1 = &min_max_noreply_time, 214 .extra1 = &min_max_noreply_time,
236 .extra2 = &max_max_noreply_time 215 .extra2 = &max_max_noreply_time
237 }, 216 },
238 { 217 {
239 .ctl_name = NET_IRDA_WARN_NOREPLY_TIME,
240 .procname = "warn_noreply_time", 218 .procname = "warn_noreply_time",
241 .data = &sysctl_warn_noreply_time, 219 .data = &sysctl_warn_noreply_time,
242 .maxlen = sizeof(int), 220 .maxlen = sizeof(int),
243 .mode = 0644, 221 .mode = 0644,
244 .proc_handler = proc_dointvec_minmax, 222 .proc_handler = proc_dointvec_minmax,
245 .strategy = sysctl_intvec,
246 .extra1 = &min_warn_noreply_time, 223 .extra1 = &min_warn_noreply_time,
247 .extra2 = &max_warn_noreply_time 224 .extra2 = &max_warn_noreply_time
248 }, 225 },
249 { 226 {
250 .ctl_name = NET_IRDA_LAP_KEEPALIVE_TIME,
251 .procname = "lap_keepalive_time", 227 .procname = "lap_keepalive_time",
252 .data = &sysctl_lap_keepalive_time, 228 .data = &sysctl_lap_keepalive_time,
253 .maxlen = sizeof(int), 229 .maxlen = sizeof(int),
254 .mode = 0644, 230 .mode = 0644,
255 .proc_handler = proc_dointvec_minmax, 231 .proc_handler = proc_dointvec_minmax,
256 .strategy = sysctl_intvec,
257 .extra1 = &min_lap_keepalive_time, 232 .extra1 = &min_lap_keepalive_time,
258 .extra2 = &max_lap_keepalive_time 233 .extra2 = &max_lap_keepalive_time
259 }, 234 },
260 { .ctl_name = 0 } 235 { }
261}; 236};
262 237
263static struct ctl_path irda_path[] = { 238static struct ctl_path irda_path[] = {
264 { .procname = "net", .ctl_name = CTL_NET, }, 239 { .procname = "net", },
265 { .procname = "irda", .ctl_name = NET_IRDA, }, 240 { .procname = "irda", },
266 { } 241 { }
267}; 242};
268 243
diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c
index 57b9304d444c..e2ebe3586263 100644
--- a/net/llc/sysctl_net_llc.c
+++ b/net/llc/sysctl_net_llc.c
@@ -15,86 +15,73 @@
15 15
16static struct ctl_table llc2_timeout_table[] = { 16static struct ctl_table llc2_timeout_table[] = {
17 { 17 {
18 .ctl_name = NET_LLC2_ACK_TIMEOUT,
19 .procname = "ack", 18 .procname = "ack",
20 .data = &sysctl_llc2_ack_timeout, 19 .data = &sysctl_llc2_ack_timeout,
21 .maxlen = sizeof(long), 20 .maxlen = sizeof(long),
22 .mode = 0644, 21 .mode = 0644,
23 .proc_handler = proc_dointvec_jiffies, 22 .proc_handler = proc_dointvec_jiffies,
24 .strategy = sysctl_jiffies,
25 }, 23 },
26 { 24 {
27 .ctl_name = NET_LLC2_BUSY_TIMEOUT,
28 .procname = "busy", 25 .procname = "busy",
29 .data = &sysctl_llc2_busy_timeout, 26 .data = &sysctl_llc2_busy_timeout,
30 .maxlen = sizeof(long), 27 .maxlen = sizeof(long),
31 .mode = 0644, 28 .mode = 0644,
32 .proc_handler = proc_dointvec_jiffies, 29 .proc_handler = proc_dointvec_jiffies,
33 .strategy = sysctl_jiffies,
34 }, 30 },
35 { 31 {
36 .ctl_name = NET_LLC2_P_TIMEOUT,
37 .procname = "p", 32 .procname = "p",
38 .data = &sysctl_llc2_p_timeout, 33 .data = &sysctl_llc2_p_timeout,
39 .maxlen = sizeof(long), 34 .maxlen = sizeof(long),
40 .mode = 0644, 35 .mode = 0644,
41 .proc_handler = proc_dointvec_jiffies, 36 .proc_handler = proc_dointvec_jiffies,
42 .strategy = sysctl_jiffies,
43 }, 37 },
44 { 38 {
45 .ctl_name = NET_LLC2_REJ_TIMEOUT,
46 .procname = "rej", 39 .procname = "rej",
47 .data = &sysctl_llc2_rej_timeout, 40 .data = &sysctl_llc2_rej_timeout,
48 .maxlen = sizeof(long), 41 .maxlen = sizeof(long),
49 .mode = 0644, 42 .mode = 0644,
50 .proc_handler = proc_dointvec_jiffies, 43 .proc_handler = proc_dointvec_jiffies,
51 .strategy = sysctl_jiffies,
52 }, 44 },
53 { 0 }, 45 { },
54}; 46};
55 47
56static struct ctl_table llc_station_table[] = { 48static struct ctl_table llc_station_table[] = {
57 { 49 {
58 .ctl_name = NET_LLC_STATION_ACK_TIMEOUT,
59 .procname = "ack_timeout", 50 .procname = "ack_timeout",
60 .data = &sysctl_llc_station_ack_timeout, 51 .data = &sysctl_llc_station_ack_timeout,
61 .maxlen = sizeof(long), 52 .maxlen = sizeof(long),
62 .mode = 0644, 53 .mode = 0644,
63 .proc_handler = proc_dointvec_jiffies, 54 .proc_handler = proc_dointvec_jiffies,
64 .strategy = sysctl_jiffies,
65 }, 55 },
66 { 0 }, 56 { },
67}; 57};
68 58
69static struct ctl_table llc2_dir_timeout_table[] = { 59static struct ctl_table llc2_dir_timeout_table[] = {
70 { 60 {
71 .ctl_name = NET_LLC2,
72 .procname = "timeout", 61 .procname = "timeout",
73 .mode = 0555, 62 .mode = 0555,
74 .child = llc2_timeout_table, 63 .child = llc2_timeout_table,
75 }, 64 },
76 { 0 }, 65 { },
77}; 66};
78 67
79static struct ctl_table llc_table[] = { 68static struct ctl_table llc_table[] = {
80 { 69 {
81 .ctl_name = NET_LLC2,
82 .procname = "llc2", 70 .procname = "llc2",
83 .mode = 0555, 71 .mode = 0555,
84 .child = llc2_dir_timeout_table, 72 .child = llc2_dir_timeout_table,
85 }, 73 },
86 { 74 {
87 .ctl_name = NET_LLC_STATION,
88 .procname = "station", 75 .procname = "station",
89 .mode = 0555, 76 .mode = 0555,
90 .child = llc_station_table, 77 .child = llc_station_table,
91 }, 78 },
92 { 0 }, 79 { },
93}; 80};
94 81
95static struct ctl_path llc_path[] = { 82static struct ctl_path llc_path[] = {
96 { .procname = "net", .ctl_name = CTL_NET, }, 83 { .procname = "net", },
97 { .procname = "llc", .ctl_name = NET_LLC, }, 84 { .procname = "llc", },
98 { } 85 { }
99}; 86};
100 87
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 5bb34737501f..60ec4e4badaa 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -273,8 +273,8 @@ void __init netfilter_init(void)
273 273
274#ifdef CONFIG_SYSCTL 274#ifdef CONFIG_SYSCTL
275struct ctl_path nf_net_netfilter_sysctl_path[] = { 275struct ctl_path nf_net_netfilter_sysctl_path[] = {
276 { .procname = "net", .ctl_name = CTL_NET, }, 276 { .procname = "net", },
277 { .procname = "netfilter", .ctl_name = NET_NETFILTER, }, 277 { .procname = "netfilter", },
278 { } 278 { }
279}; 279};
280EXPORT_SYMBOL_GPL(nf_net_netfilter_sysctl_path); 280EXPORT_SYMBOL_GPL(nf_net_netfilter_sysctl_path);
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 446e9bd4b4bc..e55a6861d26f 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1706,12 +1706,12 @@ static struct ctl_table vs_vars[] = {
1706 .mode = 0644, 1706 .mode = 0644,
1707 .proc_handler = proc_dointvec, 1707 .proc_handler = proc_dointvec,
1708 }, 1708 },
1709 { .ctl_name = 0 } 1709 { }
1710}; 1710};
1711 1711
1712const struct ctl_path net_vs_ctl_path[] = { 1712const struct ctl_path net_vs_ctl_path[] = {
1713 { .procname = "net", .ctl_name = CTL_NET, }, 1713 { .procname = "net", },
1714 { .procname = "ipv4", .ctl_name = NET_IPV4, }, 1714 { .procname = "ipv4", },
1715 { .procname = "vs", }, 1715 { .procname = "vs", },
1716 { } 1716 { }
1717}; 1717};
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index c1757f3620cd..1b9370db2305 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -121,7 +121,7 @@ static ctl_table vs_vars_table[] = {
121 .mode = 0644, 121 .mode = 0644,
122 .proc_handler = proc_dointvec_jiffies, 122 .proc_handler = proc_dointvec_jiffies,
123 }, 123 },
124 { .ctl_name = 0 } 124 { }
125}; 125};
126 126
127static struct ctl_table_header * sysctl_header; 127static struct ctl_table_header * sysctl_header;
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c
index 715b57f9540d..f7476b95ab46 100644
--- a/net/netfilter/ipvs/ip_vs_lblcr.c
+++ b/net/netfilter/ipvs/ip_vs_lblcr.c
@@ -302,7 +302,7 @@ static ctl_table vs_vars_table[] = {
302 .mode = 0644, 302 .mode = 0644,
303 .proc_handler = proc_dointvec_jiffies, 303 .proc_handler = proc_dointvec_jiffies,
304 }, 304 },
305 { .ctl_name = 0 } 305 { }
306}; 306};
307 307
308static struct ctl_table_header * sysctl_header; 308static struct ctl_table_header * sysctl_header;
diff --git a/net/netfilter/nf_conntrack_acct.c b/net/netfilter/nf_conntrack_acct.c
index 4a1d94aac20b..018f90db511c 100644
--- a/net/netfilter/nf_conntrack_acct.c
+++ b/net/netfilter/nf_conntrack_acct.c
@@ -30,7 +30,6 @@ MODULE_PARM_DESC(acct, "Enable connection tracking flow accounting.");
30#ifdef CONFIG_SYSCTL 30#ifdef CONFIG_SYSCTL
31static struct ctl_table acct_sysctl_table[] = { 31static struct ctl_table acct_sysctl_table[] = {
32 { 32 {
33 .ctl_name = CTL_UNNUMBERED,
34 .procname = "nf_conntrack_acct", 33 .procname = "nf_conntrack_acct",
35 .data = &init_net.ct.sysctl_acct, 34 .data = &init_net.ct.sysctl_acct,
36 .maxlen = sizeof(unsigned int), 35 .maxlen = sizeof(unsigned int),
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c
index aee560b4768d..d5a9bcd7d61b 100644
--- a/net/netfilter/nf_conntrack_ecache.c
+++ b/net/netfilter/nf_conntrack_ecache.c
@@ -151,7 +151,6 @@ static int nf_ct_events_retry_timeout __read_mostly = 15*HZ;
151#ifdef CONFIG_SYSCTL 151#ifdef CONFIG_SYSCTL
152static struct ctl_table event_sysctl_table[] = { 152static struct ctl_table event_sysctl_table[] = {
153 { 153 {
154 .ctl_name = CTL_UNNUMBERED,
155 .procname = "nf_conntrack_events", 154 .procname = "nf_conntrack_events",
156 .data = &init_net.ct.sysctl_events, 155 .data = &init_net.ct.sysctl_events,
157 .maxlen = sizeof(unsigned int), 156 .maxlen = sizeof(unsigned int),
@@ -159,7 +158,6 @@ static struct ctl_table event_sysctl_table[] = {
159 .proc_handler = proc_dointvec, 158 .proc_handler = proc_dointvec,
160 }, 159 },
161 { 160 {
162 .ctl_name = CTL_UNNUMBERED,
163 .procname = "nf_conntrack_events_retry_timeout", 161 .procname = "nf_conntrack_events_retry_timeout",
164 .data = &init_net.ct.sysctl_events_retry_timeout, 162 .data = &init_net.ct.sysctl_events_retry_timeout,
165 .maxlen = sizeof(unsigned int), 163 .maxlen = sizeof(unsigned int),
diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c
index 98916ef26f5d..dd375500dccc 100644
--- a/net/netfilter/nf_conntrack_proto_dccp.c
+++ b/net/netfilter/nf_conntrack_proto_dccp.c
@@ -703,64 +703,54 @@ static int dccp_nlattr_size(void)
703/* template, data assigned later */ 703/* template, data assigned later */
704static struct ctl_table dccp_sysctl_table[] = { 704static struct ctl_table dccp_sysctl_table[] = {
705 { 705 {
706 .ctl_name = CTL_UNNUMBERED,
707 .procname = "nf_conntrack_dccp_timeout_request", 706 .procname = "nf_conntrack_dccp_timeout_request",
708 .maxlen = sizeof(unsigned int), 707 .maxlen = sizeof(unsigned int),
709 .mode = 0644, 708 .mode = 0644,
710 .proc_handler = proc_dointvec_jiffies, 709 .proc_handler = proc_dointvec_jiffies,
711 }, 710 },
712 { 711 {
713 .ctl_name = CTL_UNNUMBERED,
714 .procname = "nf_conntrack_dccp_timeout_respond", 712 .procname = "nf_conntrack_dccp_timeout_respond",
715 .maxlen = sizeof(unsigned int), 713 .maxlen = sizeof(unsigned int),
716 .mode = 0644, 714 .mode = 0644,
717 .proc_handler = proc_dointvec_jiffies, 715 .proc_handler = proc_dointvec_jiffies,
718 }, 716 },
719 { 717 {
720 .ctl_name = CTL_UNNUMBERED,
721 .procname = "nf_conntrack_dccp_timeout_partopen", 718 .procname = "nf_conntrack_dccp_timeout_partopen",
722 .maxlen = sizeof(unsigned int), 719 .maxlen = sizeof(unsigned int),
723 .mode = 0644, 720 .mode = 0644,
724 .proc_handler = proc_dointvec_jiffies, 721 .proc_handler = proc_dointvec_jiffies,
725 }, 722 },
726 { 723 {
727 .ctl_name = CTL_UNNUMBERED,
728 .procname = "nf_conntrack_dccp_timeout_open", 724 .procname = "nf_conntrack_dccp_timeout_open",
729 .maxlen = sizeof(unsigned int), 725 .maxlen = sizeof(unsigned int),
730 .mode = 0644, 726 .mode = 0644,
731 .proc_handler = proc_dointvec_jiffies, 727 .proc_handler = proc_dointvec_jiffies,
732 }, 728 },
733 { 729 {
734 .ctl_name = CTL_UNNUMBERED,
735 .procname = "nf_conntrack_dccp_timeout_closereq", 730 .procname = "nf_conntrack_dccp_timeout_closereq",
736 .maxlen = sizeof(unsigned int), 731 .maxlen = sizeof(unsigned int),
737 .mode = 0644, 732 .mode = 0644,
738 .proc_handler = proc_dointvec_jiffies, 733 .proc_handler = proc_dointvec_jiffies,
739 }, 734 },
740 { 735 {
741 .ctl_name = CTL_UNNUMBERED,
742 .procname = "nf_conntrack_dccp_timeout_closing", 736 .procname = "nf_conntrack_dccp_timeout_closing",
743 .maxlen = sizeof(unsigned int), 737 .maxlen = sizeof(unsigned int),
744 .mode = 0644, 738 .mode = 0644,
745 .proc_handler = proc_dointvec_jiffies, 739 .proc_handler = proc_dointvec_jiffies,
746 }, 740 },
747 { 741 {
748 .ctl_name = CTL_UNNUMBERED,
749 .procname = "nf_conntrack_dccp_timeout_timewait", 742 .procname = "nf_conntrack_dccp_timeout_timewait",
750 .maxlen = sizeof(unsigned int), 743 .maxlen = sizeof(unsigned int),
751 .mode = 0644, 744 .mode = 0644,
752 .proc_handler = proc_dointvec_jiffies, 745 .proc_handler = proc_dointvec_jiffies,
753 }, 746 },
754 { 747 {
755 .ctl_name = CTL_UNNUMBERED,
756 .procname = "nf_conntrack_dccp_loose", 748 .procname = "nf_conntrack_dccp_loose",
757 .maxlen = sizeof(int), 749 .maxlen = sizeof(int),
758 .mode = 0644, 750 .mode = 0644,
759 .proc_handler = proc_dointvec, 751 .proc_handler = proc_dointvec,
760 }, 752 },
761 { 753 { }
762 .ctl_name = 0,
763 }
764}; 754};
765#endif /* CONFIG_SYSCTL */ 755#endif /* CONFIG_SYSCTL */
766 756
diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c
index 829374f426c4..e2091d0c7a2f 100644
--- a/net/netfilter/nf_conntrack_proto_generic.c
+++ b/net/netfilter/nf_conntrack_proto_generic.c
@@ -69,9 +69,7 @@ static struct ctl_table generic_sysctl_table[] = {
69 .mode = 0644, 69 .mode = 0644,
70 .proc_handler = proc_dointvec_jiffies, 70 .proc_handler = proc_dointvec_jiffies,
71 }, 71 },
72 { 72 { }
73 .ctl_name = 0
74 }
75}; 73};
76#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT 74#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
77static struct ctl_table generic_compat_sysctl_table[] = { 75static struct ctl_table generic_compat_sysctl_table[] = {
@@ -82,9 +80,7 @@ static struct ctl_table generic_compat_sysctl_table[] = {
82 .mode = 0644, 80 .mode = 0644,
83 .proc_handler = proc_dointvec_jiffies, 81 .proc_handler = proc_dointvec_jiffies,
84 }, 82 },
85 { 83 { }
86 .ctl_name = 0
87 }
88}; 84};
89#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ 85#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */
90#endif /* CONFIG_SYSCTL */ 86#endif /* CONFIG_SYSCTL */
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
index c10e6f36e31e..f9d930f80276 100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -595,9 +595,7 @@ static struct ctl_table sctp_sysctl_table[] = {
595 .mode = 0644, 595 .mode = 0644,
596 .proc_handler = proc_dointvec_jiffies, 596 .proc_handler = proc_dointvec_jiffies,
597 }, 597 },
598 { 598 { }
599 .ctl_name = 0
600 }
601}; 599};
602 600
603#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT 601#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
@@ -651,9 +649,7 @@ static struct ctl_table sctp_compat_sysctl_table[] = {
651 .mode = 0644, 649 .mode = 0644,
652 .proc_handler = proc_dointvec_jiffies, 650 .proc_handler = proc_dointvec_jiffies,
653 }, 651 },
654 { 652 { }
655 .ctl_name = 0
656 }
657}; 653};
658#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ 654#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */
659#endif 655#endif
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 37a8c74be619..3c96437b45ad 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -1322,7 +1322,6 @@ static struct ctl_table tcp_sysctl_table[] = {
1322 .proc_handler = proc_dointvec_jiffies, 1322 .proc_handler = proc_dointvec_jiffies,
1323 }, 1323 },
1324 { 1324 {
1325 .ctl_name = NET_NF_CONNTRACK_TCP_LOOSE,
1326 .procname = "nf_conntrack_tcp_loose", 1325 .procname = "nf_conntrack_tcp_loose",
1327 .data = &nf_ct_tcp_loose, 1326 .data = &nf_ct_tcp_loose,
1328 .maxlen = sizeof(unsigned int), 1327 .maxlen = sizeof(unsigned int),
@@ -1330,7 +1329,6 @@ static struct ctl_table tcp_sysctl_table[] = {
1330 .proc_handler = proc_dointvec, 1329 .proc_handler = proc_dointvec,
1331 }, 1330 },
1332 { 1331 {
1333 .ctl_name = NET_NF_CONNTRACK_TCP_BE_LIBERAL,
1334 .procname = "nf_conntrack_tcp_be_liberal", 1332 .procname = "nf_conntrack_tcp_be_liberal",
1335 .data = &nf_ct_tcp_be_liberal, 1333 .data = &nf_ct_tcp_be_liberal,
1336 .maxlen = sizeof(unsigned int), 1334 .maxlen = sizeof(unsigned int),
@@ -1338,16 +1336,13 @@ static struct ctl_table tcp_sysctl_table[] = {
1338 .proc_handler = proc_dointvec, 1336 .proc_handler = proc_dointvec,
1339 }, 1337 },
1340 { 1338 {
1341 .ctl_name = NET_NF_CONNTRACK_TCP_MAX_RETRANS,
1342 .procname = "nf_conntrack_tcp_max_retrans", 1339 .procname = "nf_conntrack_tcp_max_retrans",
1343 .data = &nf_ct_tcp_max_retrans, 1340 .data = &nf_ct_tcp_max_retrans,
1344 .maxlen = sizeof(unsigned int), 1341 .maxlen = sizeof(unsigned int),
1345 .mode = 0644, 1342 .mode = 0644,
1346 .proc_handler = proc_dointvec, 1343 .proc_handler = proc_dointvec,
1347 }, 1344 },
1348 { 1345 { }
1349 .ctl_name = 0
1350 }
1351}; 1346};
1352 1347
1353#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT 1348#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
@@ -1423,7 +1418,6 @@ static struct ctl_table tcp_compat_sysctl_table[] = {
1423 .proc_handler = proc_dointvec_jiffies, 1418 .proc_handler = proc_dointvec_jiffies,
1424 }, 1419 },
1425 { 1420 {
1426 .ctl_name = NET_IPV4_NF_CONNTRACK_TCP_LOOSE,
1427 .procname = "ip_conntrack_tcp_loose", 1421 .procname = "ip_conntrack_tcp_loose",
1428 .data = &nf_ct_tcp_loose, 1422 .data = &nf_ct_tcp_loose,
1429 .maxlen = sizeof(unsigned int), 1423 .maxlen = sizeof(unsigned int),
@@ -1431,7 +1425,6 @@ static struct ctl_table tcp_compat_sysctl_table[] = {
1431 .proc_handler = proc_dointvec, 1425 .proc_handler = proc_dointvec,
1432 }, 1426 },
1433 { 1427 {
1434 .ctl_name = NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL,
1435 .procname = "ip_conntrack_tcp_be_liberal", 1428 .procname = "ip_conntrack_tcp_be_liberal",
1436 .data = &nf_ct_tcp_be_liberal, 1429 .data = &nf_ct_tcp_be_liberal,
1437 .maxlen = sizeof(unsigned int), 1430 .maxlen = sizeof(unsigned int),
@@ -1439,16 +1432,13 @@ static struct ctl_table tcp_compat_sysctl_table[] = {
1439 .proc_handler = proc_dointvec, 1432 .proc_handler = proc_dointvec,
1440 }, 1433 },
1441 { 1434 {
1442 .ctl_name = NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS,
1443 .procname = "ip_conntrack_tcp_max_retrans", 1435 .procname = "ip_conntrack_tcp_max_retrans",
1444 .data = &nf_ct_tcp_max_retrans, 1436 .data = &nf_ct_tcp_max_retrans,
1445 .maxlen = sizeof(unsigned int), 1437 .maxlen = sizeof(unsigned int),
1446 .mode = 0644, 1438 .mode = 0644,
1447 .proc_handler = proc_dointvec, 1439 .proc_handler = proc_dointvec,
1448 }, 1440 },
1449 { 1441 { }
1450 .ctl_name = 0
1451 }
1452}; 1442};
1453#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ 1443#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */
1454#endif /* CONFIG_SYSCTL */ 1444#endif /* CONFIG_SYSCTL */
diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
index 70809d117b91..5c5518bedb4b 100644
--- a/net/netfilter/nf_conntrack_proto_udp.c
+++ b/net/netfilter/nf_conntrack_proto_udp.c
@@ -154,9 +154,7 @@ static struct ctl_table udp_sysctl_table[] = {
154 .mode = 0644, 154 .mode = 0644,
155 .proc_handler = proc_dointvec_jiffies, 155 .proc_handler = proc_dointvec_jiffies,
156 }, 156 },
157 { 157 { }
158 .ctl_name = 0
159 }
160}; 158};
161#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT 159#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
162static struct ctl_table udp_compat_sysctl_table[] = { 160static struct ctl_table udp_compat_sysctl_table[] = {
@@ -174,9 +172,7 @@ static struct ctl_table udp_compat_sysctl_table[] = {
174 .mode = 0644, 172 .mode = 0644,
175 .proc_handler = proc_dointvec_jiffies, 173 .proc_handler = proc_dointvec_jiffies,
176 }, 174 },
177 { 175 { }
178 .ctl_name = 0
179 }
180}; 176};
181#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ 177#endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */
182#endif /* CONFIG_SYSCTL */ 178#endif /* CONFIG_SYSCTL */
diff --git a/net/netfilter/nf_conntrack_proto_udplite.c b/net/netfilter/nf_conntrack_proto_udplite.c
index 0badedc542d3..458655bb2106 100644
--- a/net/netfilter/nf_conntrack_proto_udplite.c
+++ b/net/netfilter/nf_conntrack_proto_udplite.c
@@ -146,7 +146,6 @@ static unsigned int udplite_sysctl_table_users;
146static struct ctl_table_header *udplite_sysctl_header; 146static struct ctl_table_header *udplite_sysctl_header;
147static struct ctl_table udplite_sysctl_table[] = { 147static struct ctl_table udplite_sysctl_table[] = {
148 { 148 {
149 .ctl_name = CTL_UNNUMBERED,
150 .procname = "nf_conntrack_udplite_timeout", 149 .procname = "nf_conntrack_udplite_timeout",
151 .data = &nf_ct_udplite_timeout, 150 .data = &nf_ct_udplite_timeout,
152 .maxlen = sizeof(unsigned int), 151 .maxlen = sizeof(unsigned int),
@@ -154,16 +153,13 @@ static struct ctl_table udplite_sysctl_table[] = {
154 .proc_handler = proc_dointvec_jiffies, 153 .proc_handler = proc_dointvec_jiffies,
155 }, 154 },
156 { 155 {
157 .ctl_name = CTL_UNNUMBERED,
158 .procname = "nf_conntrack_udplite_timeout_stream", 156 .procname = "nf_conntrack_udplite_timeout_stream",
159 .data = &nf_ct_udplite_timeout_stream, 157 .data = &nf_ct_udplite_timeout_stream,
160 .maxlen = sizeof(unsigned int), 158 .maxlen = sizeof(unsigned int),
161 .mode = 0644, 159 .mode = 0644,
162 .proc_handler = proc_dointvec_jiffies, 160 .proc_handler = proc_dointvec_jiffies,
163 }, 161 },
164 { 162 { }
165 .ctl_name = 0
166 }
167}; 163};
168#endif /* CONFIG_SYSCTL */ 164#endif /* CONFIG_SYSCTL */
169 165
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 193515381970..028aba667ef7 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -340,7 +340,6 @@ static struct ctl_table_header *nf_ct_netfilter_header;
340 340
341static ctl_table nf_ct_sysctl_table[] = { 341static ctl_table nf_ct_sysctl_table[] = {
342 { 342 {
343 .ctl_name = NET_NF_CONNTRACK_MAX,
344 .procname = "nf_conntrack_max", 343 .procname = "nf_conntrack_max",
345 .data = &nf_conntrack_max, 344 .data = &nf_conntrack_max,
346 .maxlen = sizeof(int), 345 .maxlen = sizeof(int),
@@ -348,7 +347,6 @@ static ctl_table nf_ct_sysctl_table[] = {
348 .proc_handler = proc_dointvec, 347 .proc_handler = proc_dointvec,
349 }, 348 },
350 { 349 {
351 .ctl_name = NET_NF_CONNTRACK_COUNT,
352 .procname = "nf_conntrack_count", 350 .procname = "nf_conntrack_count",
353 .data = &init_net.ct.count, 351 .data = &init_net.ct.count,
354 .maxlen = sizeof(int), 352 .maxlen = sizeof(int),
@@ -356,7 +354,6 @@ static ctl_table nf_ct_sysctl_table[] = {
356 .proc_handler = proc_dointvec, 354 .proc_handler = proc_dointvec,
357 }, 355 },
358 { 356 {
359 .ctl_name = NET_NF_CONNTRACK_BUCKETS,
360 .procname = "nf_conntrack_buckets", 357 .procname = "nf_conntrack_buckets",
361 .data = &nf_conntrack_htable_size, 358 .data = &nf_conntrack_htable_size,
362 .maxlen = sizeof(unsigned int), 359 .maxlen = sizeof(unsigned int),
@@ -364,7 +361,6 @@ static ctl_table nf_ct_sysctl_table[] = {
364 .proc_handler = proc_dointvec, 361 .proc_handler = proc_dointvec,
365 }, 362 },
366 { 363 {
367 .ctl_name = NET_NF_CONNTRACK_CHECKSUM,
368 .procname = "nf_conntrack_checksum", 364 .procname = "nf_conntrack_checksum",
369 .data = &init_net.ct.sysctl_checksum, 365 .data = &init_net.ct.sysctl_checksum,
370 .maxlen = sizeof(unsigned int), 366 .maxlen = sizeof(unsigned int),
@@ -372,43 +368,39 @@ static ctl_table nf_ct_sysctl_table[] = {
372 .proc_handler = proc_dointvec, 368 .proc_handler = proc_dointvec,
373 }, 369 },
374 { 370 {
375 .ctl_name = NET_NF_CONNTRACK_LOG_INVALID,
376 .procname = "nf_conntrack_log_invalid", 371 .procname = "nf_conntrack_log_invalid",
377 .data = &init_net.ct.sysctl_log_invalid, 372 .data = &init_net.ct.sysctl_log_invalid,
378 .maxlen = sizeof(unsigned int), 373 .maxlen = sizeof(unsigned int),
379 .mode = 0644, 374 .mode = 0644,
380 .proc_handler = proc_dointvec_minmax, 375 .proc_handler = proc_dointvec_minmax,
381 .strategy = sysctl_intvec,
382 .extra1 = &log_invalid_proto_min, 376 .extra1 = &log_invalid_proto_min,
383 .extra2 = &log_invalid_proto_max, 377 .extra2 = &log_invalid_proto_max,
384 }, 378 },
385 { 379 {
386 .ctl_name = CTL_UNNUMBERED,
387 .procname = "nf_conntrack_expect_max", 380 .procname = "nf_conntrack_expect_max",
388 .data = &nf_ct_expect_max, 381 .data = &nf_ct_expect_max,
389 .maxlen = sizeof(int), 382 .maxlen = sizeof(int),
390 .mode = 0644, 383 .mode = 0644,
391 .proc_handler = proc_dointvec, 384 .proc_handler = proc_dointvec,
392 }, 385 },
393 { .ctl_name = 0 } 386 { }
394}; 387};
395 388
396#define NET_NF_CONNTRACK_MAX 2089 389#define NET_NF_CONNTRACK_MAX 2089
397 390
398static ctl_table nf_ct_netfilter_table[] = { 391static ctl_table nf_ct_netfilter_table[] = {
399 { 392 {
400 .ctl_name = NET_NF_CONNTRACK_MAX,
401 .procname = "nf_conntrack_max", 393 .procname = "nf_conntrack_max",
402 .data = &nf_conntrack_max, 394 .data = &nf_conntrack_max,
403 .maxlen = sizeof(int), 395 .maxlen = sizeof(int),
404 .mode = 0644, 396 .mode = 0644,
405 .proc_handler = proc_dointvec, 397 .proc_handler = proc_dointvec,
406 }, 398 },
407 { .ctl_name = 0 } 399 { }
408}; 400};
409 401
410static struct ctl_path nf_ct_path[] = { 402static struct ctl_path nf_ct_path[] = {
411 { .procname = "net", .ctl_name = CTL_NET, }, 403 { .procname = "net", },
412 { } 404 { }
413}; 405};
414 406
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index d65d3481919c..015725a5cd50 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -208,9 +208,9 @@ static const struct file_operations nflog_file_ops = {
208 208
209#ifdef CONFIG_SYSCTL 209#ifdef CONFIG_SYSCTL
210static struct ctl_path nf_log_sysctl_path[] = { 210static struct ctl_path nf_log_sysctl_path[] = {
211 { .procname = "net", .ctl_name = CTL_NET, }, 211 { .procname = "net", },
212 { .procname = "netfilter", .ctl_name = NET_NETFILTER, }, 212 { .procname = "netfilter", },
213 { .procname = "nf_log", .ctl_name = CTL_UNNUMBERED, }, 213 { .procname = "nf_log", },
214 { } 214 { }
215}; 215};
216 216
@@ -265,7 +265,6 @@ static __init int netfilter_log_sysctl_init(void)
265 265
266 for (i = NFPROTO_UNSPEC; i < NFPROTO_NUMPROTO; i++) { 266 for (i = NFPROTO_UNSPEC; i < NFPROTO_NUMPROTO; i++) {
267 snprintf(nf_log_sysctl_fnames[i-NFPROTO_UNSPEC], 3, "%d", i); 267 snprintf(nf_log_sysctl_fnames[i-NFPROTO_UNSPEC], 3, "%d", i);
268 nf_log_sysctl_table[i].ctl_name = CTL_UNNUMBERED;
269 nf_log_sysctl_table[i].procname = 268 nf_log_sysctl_table[i].procname =
270 nf_log_sysctl_fnames[i-NFPROTO_UNSPEC]; 269 nf_log_sysctl_fnames[i-NFPROTO_UNSPEC];
271 nf_log_sysctl_table[i].data = NULL; 270 nf_log_sysctl_table[i].data = NULL;
diff --git a/net/netrom/sysctl_net_netrom.c b/net/netrom/sysctl_net_netrom.c
index 7b49591fe87c..1e0fa9e57aac 100644
--- a/net/netrom/sysctl_net_netrom.c
+++ b/net/netrom/sysctl_net_netrom.c
@@ -36,143 +36,119 @@ static struct ctl_table_header *nr_table_header;
36 36
37static ctl_table nr_table[] = { 37static ctl_table nr_table[] = {
38 { 38 {
39 .ctl_name = NET_NETROM_DEFAULT_PATH_QUALITY,
40 .procname = "default_path_quality", 39 .procname = "default_path_quality",
41 .data = &sysctl_netrom_default_path_quality, 40 .data = &sysctl_netrom_default_path_quality,
42 .maxlen = sizeof(int), 41 .maxlen = sizeof(int),
43 .mode = 0644, 42 .mode = 0644,
44 .proc_handler = proc_dointvec_minmax, 43 .proc_handler = proc_dointvec_minmax,
45 .strategy = sysctl_intvec,
46 .extra1 = &min_quality, 44 .extra1 = &min_quality,
47 .extra2 = &max_quality 45 .extra2 = &max_quality
48 }, 46 },
49 { 47 {
50 .ctl_name = NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER,
51 .procname = "obsolescence_count_initialiser", 48 .procname = "obsolescence_count_initialiser",
52 .data = &sysctl_netrom_obsolescence_count_initialiser, 49 .data = &sysctl_netrom_obsolescence_count_initialiser,
53 .maxlen = sizeof(int), 50 .maxlen = sizeof(int),
54 .mode = 0644, 51 .mode = 0644,
55 .proc_handler = proc_dointvec_minmax, 52 .proc_handler = proc_dointvec_minmax,
56 .strategy = sysctl_intvec,
57 .extra1 = &min_obs, 53 .extra1 = &min_obs,
58 .extra2 = &max_obs 54 .extra2 = &max_obs
59 }, 55 },
60 { 56 {
61 .ctl_name = NET_NETROM_NETWORK_TTL_INITIALISER,
62 .procname = "network_ttl_initialiser", 57 .procname = "network_ttl_initialiser",
63 .data = &sysctl_netrom_network_ttl_initialiser, 58 .data = &sysctl_netrom_network_ttl_initialiser,
64 .maxlen = sizeof(int), 59 .maxlen = sizeof(int),
65 .mode = 0644, 60 .mode = 0644,
66 .proc_handler = proc_dointvec_minmax, 61 .proc_handler = proc_dointvec_minmax,
67 .strategy = sysctl_intvec,
68 .extra1 = &min_ttl, 62 .extra1 = &min_ttl,
69 .extra2 = &max_ttl 63 .extra2 = &max_ttl
70 }, 64 },
71 { 65 {
72 .ctl_name = NET_NETROM_TRANSPORT_TIMEOUT,
73 .procname = "transport_timeout", 66 .procname = "transport_timeout",
74 .data = &sysctl_netrom_transport_timeout, 67 .data = &sysctl_netrom_transport_timeout,
75 .maxlen = sizeof(int), 68 .maxlen = sizeof(int),
76 .mode = 0644, 69 .mode = 0644,
77 .proc_handler = proc_dointvec_minmax, 70 .proc_handler = proc_dointvec_minmax,
78 .strategy = sysctl_intvec,
79 .extra1 = &min_t1, 71 .extra1 = &min_t1,
80 .extra2 = &max_t1 72 .extra2 = &max_t1
81 }, 73 },
82 { 74 {
83 .ctl_name = NET_NETROM_TRANSPORT_MAXIMUM_TRIES,
84 .procname = "transport_maximum_tries", 75 .procname = "transport_maximum_tries",
85 .data = &sysctl_netrom_transport_maximum_tries, 76 .data = &sysctl_netrom_transport_maximum_tries,
86 .maxlen = sizeof(int), 77 .maxlen = sizeof(int),
87 .mode = 0644, 78 .mode = 0644,
88 .proc_handler = proc_dointvec_minmax, 79 .proc_handler = proc_dointvec_minmax,
89 .strategy = sysctl_intvec,
90 .extra1 = &min_n2, 80 .extra1 = &min_n2,
91 .extra2 = &max_n2 81 .extra2 = &max_n2
92 }, 82 },
93 { 83 {
94 .ctl_name = NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY,
95 .procname = "transport_acknowledge_delay", 84 .procname = "transport_acknowledge_delay",
96 .data = &sysctl_netrom_transport_acknowledge_delay, 85 .data = &sysctl_netrom_transport_acknowledge_delay,
97 .maxlen = sizeof(int), 86 .maxlen = sizeof(int),
98 .mode = 0644, 87 .mode = 0644,
99 .proc_handler = proc_dointvec_minmax, 88 .proc_handler = proc_dointvec_minmax,
100 .strategy = sysctl_intvec,
101 .extra1 = &min_t2, 89 .extra1 = &min_t2,
102 .extra2 = &max_t2 90 .extra2 = &max_t2
103 }, 91 },
104 { 92 {
105 .ctl_name = NET_NETROM_TRANSPORT_BUSY_DELAY,
106 .procname = "transport_busy_delay", 93 .procname = "transport_busy_delay",
107 .data = &sysctl_netrom_transport_busy_delay, 94 .data = &sysctl_netrom_transport_busy_delay,
108 .maxlen = sizeof(int), 95 .maxlen = sizeof(int),
109 .mode = 0644, 96 .mode = 0644,
110 .proc_handler = proc_dointvec_minmax, 97 .proc_handler = proc_dointvec_minmax,
111 .strategy = sysctl_intvec,
112 .extra1 = &min_t4, 98 .extra1 = &min_t4,
113 .extra2 = &max_t4 99 .extra2 = &max_t4
114 }, 100 },
115 { 101 {
116 .ctl_name = NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE,
117 .procname = "transport_requested_window_size", 102 .procname = "transport_requested_window_size",
118 .data = &sysctl_netrom_transport_requested_window_size, 103 .data = &sysctl_netrom_transport_requested_window_size,
119 .maxlen = sizeof(int), 104 .maxlen = sizeof(int),
120 .mode = 0644, 105 .mode = 0644,
121 .proc_handler = proc_dointvec_minmax, 106 .proc_handler = proc_dointvec_minmax,
122 .strategy = sysctl_intvec,
123 .extra1 = &min_window, 107 .extra1 = &min_window,
124 .extra2 = &max_window 108 .extra2 = &max_window
125 }, 109 },
126 { 110 {
127 .ctl_name = NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT,
128 .procname = "transport_no_activity_timeout", 111 .procname = "transport_no_activity_timeout",
129 .data = &sysctl_netrom_transport_no_activity_timeout, 112 .data = &sysctl_netrom_transport_no_activity_timeout,
130 .maxlen = sizeof(int), 113 .maxlen = sizeof(int),
131 .mode = 0644, 114 .mode = 0644,
132 .proc_handler = proc_dointvec_minmax, 115 .proc_handler = proc_dointvec_minmax,
133 .strategy = sysctl_intvec,
134 .extra1 = &min_idle, 116 .extra1 = &min_idle,
135 .extra2 = &max_idle 117 .extra2 = &max_idle
136 }, 118 },
137 { 119 {
138 .ctl_name = NET_NETROM_ROUTING_CONTROL,
139 .procname = "routing_control", 120 .procname = "routing_control",
140 .data = &sysctl_netrom_routing_control, 121 .data = &sysctl_netrom_routing_control,
141 .maxlen = sizeof(int), 122 .maxlen = sizeof(int),
142 .mode = 0644, 123 .mode = 0644,
143 .proc_handler = proc_dointvec_minmax, 124 .proc_handler = proc_dointvec_minmax,
144 .strategy = sysctl_intvec,
145 .extra1 = &min_route, 125 .extra1 = &min_route,
146 .extra2 = &max_route 126 .extra2 = &max_route
147 }, 127 },
148 { 128 {
149 .ctl_name = NET_NETROM_LINK_FAILS_COUNT,
150 .procname = "link_fails_count", 129 .procname = "link_fails_count",
151 .data = &sysctl_netrom_link_fails_count, 130 .data = &sysctl_netrom_link_fails_count,
152 .maxlen = sizeof(int), 131 .maxlen = sizeof(int),
153 .mode = 0644, 132 .mode = 0644,
154 .proc_handler = proc_dointvec_minmax, 133 .proc_handler = proc_dointvec_minmax,
155 .strategy = sysctl_intvec,
156 .extra1 = &min_fails, 134 .extra1 = &min_fails,
157 .extra2 = &max_fails 135 .extra2 = &max_fails
158 }, 136 },
159 { 137 {
160 .ctl_name = NET_NETROM_RESET,
161 .procname = "reset", 138 .procname = "reset",
162 .data = &sysctl_netrom_reset_circuit, 139 .data = &sysctl_netrom_reset_circuit,
163 .maxlen = sizeof(int), 140 .maxlen = sizeof(int),
164 .mode = 0644, 141 .mode = 0644,
165 .proc_handler = proc_dointvec_minmax, 142 .proc_handler = proc_dointvec_minmax,
166 .strategy = sysctl_intvec,
167 .extra1 = &min_reset, 143 .extra1 = &min_reset,
168 .extra2 = &max_reset 144 .extra2 = &max_reset
169 }, 145 },
170 { .ctl_name = 0 } 146 { }
171}; 147};
172 148
173static struct ctl_path nr_path[] = { 149static struct ctl_path nr_path[] = {
174 { .procname = "net", .ctl_name = CTL_NET, }, 150 { .procname = "net", },
175 { .procname = "netrom", .ctl_name = NET_NETROM, }, 151 { .procname = "netrom", },
176 { } 152 { }
177}; 153};
178 154
diff --git a/net/phonet/sysctl.c b/net/phonet/sysctl.c
index 2220f3322326..cea1c7dbdae2 100644
--- a/net/phonet/sysctl.c
+++ b/net/phonet/sysctl.c
@@ -84,20 +84,18 @@ static int proc_local_port_range(ctl_table *table, int write,
84 84
85static struct ctl_table phonet_table[] = { 85static struct ctl_table phonet_table[] = {
86 { 86 {
87 .ctl_name = CTL_UNNUMBERED,
88 .procname = "local_port_range", 87 .procname = "local_port_range",
89 .data = &local_port_range, 88 .data = &local_port_range,
90 .maxlen = sizeof(local_port_range), 89 .maxlen = sizeof(local_port_range),
91 .mode = 0644, 90 .mode = 0644,
92 .proc_handler = proc_local_port_range, 91 .proc_handler = proc_local_port_range,
93 .strategy = NULL,
94 }, 92 },
95 { .ctl_name = 0 } 93 { }
96}; 94};
97 95
98static struct ctl_path phonet_ctl_path[] = { 96static struct ctl_path phonet_ctl_path[] = {
99 { .procname = "net", .ctl_name = CTL_NET, }, 97 { .procname = "net", },
100 { .procname = "phonet", .ctl_name = CTL_UNNUMBERED, }, 98 { .procname = "phonet", },
101 { }, 99 { },
102}; 100};
103 101
diff --git a/net/rds/ib_sysctl.c b/net/rds/ib_sysctl.c
index 84b5ffcb280f..03f01cb4e0fe 100644
--- a/net/rds/ib_sysctl.c
+++ b/net/rds/ib_sysctl.c
@@ -67,68 +67,62 @@ unsigned int rds_ib_sysctl_flow_control = 0;
67 67
68ctl_table rds_ib_sysctl_table[] = { 68ctl_table rds_ib_sysctl_table[] = {
69 { 69 {
70 .ctl_name = CTL_UNNUMBERED,
71 .procname = "max_send_wr", 70 .procname = "max_send_wr",
72 .data = &rds_ib_sysctl_max_send_wr, 71 .data = &rds_ib_sysctl_max_send_wr,
73 .maxlen = sizeof(unsigned long), 72 .maxlen = sizeof(unsigned long),
74 .mode = 0644, 73 .mode = 0644,
75 .proc_handler = &proc_doulongvec_minmax, 74 .proc_handler = proc_doulongvec_minmax,
76 .extra1 = &rds_ib_sysctl_max_wr_min, 75 .extra1 = &rds_ib_sysctl_max_wr_min,
77 .extra2 = &rds_ib_sysctl_max_wr_max, 76 .extra2 = &rds_ib_sysctl_max_wr_max,
78 }, 77 },
79 { 78 {
80 .ctl_name = CTL_UNNUMBERED,
81 .procname = "max_recv_wr", 79 .procname = "max_recv_wr",
82 .data = &rds_ib_sysctl_max_recv_wr, 80 .data = &rds_ib_sysctl_max_recv_wr,
83 .maxlen = sizeof(unsigned long), 81 .maxlen = sizeof(unsigned long),
84 .mode = 0644, 82 .mode = 0644,
85 .proc_handler = &proc_doulongvec_minmax, 83 .proc_handler = proc_doulongvec_minmax,
86 .extra1 = &rds_ib_sysctl_max_wr_min, 84 .extra1 = &rds_ib_sysctl_max_wr_min,
87 .extra2 = &rds_ib_sysctl_max_wr_max, 85 .extra2 = &rds_ib_sysctl_max_wr_max,
88 }, 86 },
89 { 87 {
90 .ctl_name = CTL_UNNUMBERED,
91 .procname = "max_unsignaled_wr", 88 .procname = "max_unsignaled_wr",
92 .data = &rds_ib_sysctl_max_unsig_wrs, 89 .data = &rds_ib_sysctl_max_unsig_wrs,
93 .maxlen = sizeof(unsigned long), 90 .maxlen = sizeof(unsigned long),
94 .mode = 0644, 91 .mode = 0644,
95 .proc_handler = &proc_doulongvec_minmax, 92 .proc_handler = proc_doulongvec_minmax,
96 .extra1 = &rds_ib_sysctl_max_unsig_wr_min, 93 .extra1 = &rds_ib_sysctl_max_unsig_wr_min,
97 .extra2 = &rds_ib_sysctl_max_unsig_wr_max, 94 .extra2 = &rds_ib_sysctl_max_unsig_wr_max,
98 }, 95 },
99 { 96 {
100 .ctl_name = CTL_UNNUMBERED,
101 .procname = "max_unsignaled_bytes", 97 .procname = "max_unsignaled_bytes",
102 .data = &rds_ib_sysctl_max_unsig_bytes, 98 .data = &rds_ib_sysctl_max_unsig_bytes,
103 .maxlen = sizeof(unsigned long), 99 .maxlen = sizeof(unsigned long),
104 .mode = 0644, 100 .mode = 0644,
105 .proc_handler = &proc_doulongvec_minmax, 101 .proc_handler = proc_doulongvec_minmax,
106 .extra1 = &rds_ib_sysctl_max_unsig_bytes_min, 102 .extra1 = &rds_ib_sysctl_max_unsig_bytes_min,
107 .extra2 = &rds_ib_sysctl_max_unsig_bytes_max, 103 .extra2 = &rds_ib_sysctl_max_unsig_bytes_max,
108 }, 104 },
109 { 105 {
110 .ctl_name = CTL_UNNUMBERED,
111 .procname = "max_recv_allocation", 106 .procname = "max_recv_allocation",
112 .data = &rds_ib_sysctl_max_recv_allocation, 107 .data = &rds_ib_sysctl_max_recv_allocation,
113 .maxlen = sizeof(unsigned long), 108 .maxlen = sizeof(unsigned long),
114 .mode = 0644, 109 .mode = 0644,
115 .proc_handler = &proc_doulongvec_minmax, 110 .proc_handler = proc_doulongvec_minmax,
116 }, 111 },
117 { 112 {
118 .ctl_name = CTL_UNNUMBERED,
119 .procname = "flow_control", 113 .procname = "flow_control",
120 .data = &rds_ib_sysctl_flow_control, 114 .data = &rds_ib_sysctl_flow_control,
121 .maxlen = sizeof(rds_ib_sysctl_flow_control), 115 .maxlen = sizeof(rds_ib_sysctl_flow_control),
122 .mode = 0644, 116 .mode = 0644,
123 .proc_handler = &proc_dointvec, 117 .proc_handler = proc_dointvec,
124 }, 118 },
125 { .ctl_name = 0} 119 { }
126}; 120};
127 121
128static struct ctl_path rds_ib_sysctl_path[] = { 122static struct ctl_path rds_ib_sysctl_path[] = {
129 { .procname = "net", .ctl_name = CTL_NET, }, 123 { .procname = "net", },
130 { .procname = "rds", .ctl_name = CTL_UNNUMBERED, }, 124 { .procname = "rds", },
131 { .procname = "ib", .ctl_name = CTL_UNNUMBERED, }, 125 { .procname = "ib", },
132 { } 126 { }
133}; 127};
134 128
diff --git a/net/rds/iw_sysctl.c b/net/rds/iw_sysctl.c
index 9590678cd616..1c4428a61a02 100644
--- a/net/rds/iw_sysctl.c
+++ b/net/rds/iw_sysctl.c
@@ -57,68 +57,62 @@ unsigned int rds_iw_sysctl_flow_control = 1;
57 57
58ctl_table rds_iw_sysctl_table[] = { 58ctl_table rds_iw_sysctl_table[] = {
59 { 59 {
60 .ctl_name = CTL_UNNUMBERED,
61 .procname = "max_send_wr", 60 .procname = "max_send_wr",
62 .data = &rds_iw_sysctl_max_send_wr, 61 .data = &rds_iw_sysctl_max_send_wr,
63 .maxlen = sizeof(unsigned long), 62 .maxlen = sizeof(unsigned long),
64 .mode = 0644, 63 .mode = 0644,
65 .proc_handler = &proc_doulongvec_minmax, 64 .proc_handler = proc_doulongvec_minmax,
66 .extra1 = &rds_iw_sysctl_max_wr_min, 65 .extra1 = &rds_iw_sysctl_max_wr_min,
67 .extra2 = &rds_iw_sysctl_max_wr_max, 66 .extra2 = &rds_iw_sysctl_max_wr_max,
68 }, 67 },
69 { 68 {
70 .ctl_name = CTL_UNNUMBERED,
71 .procname = "max_recv_wr", 69 .procname = "max_recv_wr",
72 .data = &rds_iw_sysctl_max_recv_wr, 70 .data = &rds_iw_sysctl_max_recv_wr,
73 .maxlen = sizeof(unsigned long), 71 .maxlen = sizeof(unsigned long),
74 .mode = 0644, 72 .mode = 0644,
75 .proc_handler = &proc_doulongvec_minmax, 73 .proc_handler = proc_doulongvec_minmax,
76 .extra1 = &rds_iw_sysctl_max_wr_min, 74 .extra1 = &rds_iw_sysctl_max_wr_min,
77 .extra2 = &rds_iw_sysctl_max_wr_max, 75 .extra2 = &rds_iw_sysctl_max_wr_max,
78 }, 76 },
79 { 77 {
80 .ctl_name = CTL_UNNUMBERED,
81 .procname = "max_unsignaled_wr", 78 .procname = "max_unsignaled_wr",
82 .data = &rds_iw_sysctl_max_unsig_wrs, 79 .data = &rds_iw_sysctl_max_unsig_wrs,
83 .maxlen = sizeof(unsigned long), 80 .maxlen = sizeof(unsigned long),
84 .mode = 0644, 81 .mode = 0644,
85 .proc_handler = &proc_doulongvec_minmax, 82 .proc_handler = proc_doulongvec_minmax,
86 .extra1 = &rds_iw_sysctl_max_unsig_wr_min, 83 .extra1 = &rds_iw_sysctl_max_unsig_wr_min,
87 .extra2 = &rds_iw_sysctl_max_unsig_wr_max, 84 .extra2 = &rds_iw_sysctl_max_unsig_wr_max,
88 }, 85 },
89 { 86 {
90 .ctl_name = CTL_UNNUMBERED,
91 .procname = "max_unsignaled_bytes", 87 .procname = "max_unsignaled_bytes",
92 .data = &rds_iw_sysctl_max_unsig_bytes, 88 .data = &rds_iw_sysctl_max_unsig_bytes,
93 .maxlen = sizeof(unsigned long), 89 .maxlen = sizeof(unsigned long),
94 .mode = 0644, 90 .mode = 0644,
95 .proc_handler = &proc_doulongvec_minmax, 91 .proc_handler = proc_doulongvec_minmax,
96 .extra1 = &rds_iw_sysctl_max_unsig_bytes_min, 92 .extra1 = &rds_iw_sysctl_max_unsig_bytes_min,
97 .extra2 = &rds_iw_sysctl_max_unsig_bytes_max, 93 .extra2 = &rds_iw_sysctl_max_unsig_bytes_max,
98 }, 94 },
99 { 95 {
100 .ctl_name = CTL_UNNUMBERED,
101 .procname = "max_recv_allocation", 96 .procname = "max_recv_allocation",
102 .data = &rds_iw_sysctl_max_recv_allocation, 97 .data = &rds_iw_sysctl_max_recv_allocation,
103 .maxlen = sizeof(unsigned long), 98 .maxlen = sizeof(unsigned long),
104 .mode = 0644, 99 .mode = 0644,
105 .proc_handler = &proc_doulongvec_minmax, 100 .proc_handler = proc_doulongvec_minmax,
106 }, 101 },
107 { 102 {
108 .ctl_name = CTL_UNNUMBERED,
109 .procname = "flow_control", 103 .procname = "flow_control",
110 .data = &rds_iw_sysctl_flow_control, 104 .data = &rds_iw_sysctl_flow_control,
111 .maxlen = sizeof(rds_iw_sysctl_flow_control), 105 .maxlen = sizeof(rds_iw_sysctl_flow_control),
112 .mode = 0644, 106 .mode = 0644,
113 .proc_handler = &proc_dointvec, 107 .proc_handler = proc_dointvec,
114 }, 108 },
115 { .ctl_name = 0} 109 { }
116}; 110};
117 111
118static struct ctl_path rds_iw_sysctl_path[] = { 112static struct ctl_path rds_iw_sysctl_path[] = {
119 { .procname = "net", .ctl_name = CTL_NET, }, 113 { .procname = "net", },
120 { .procname = "rds", .ctl_name = CTL_UNNUMBERED, }, 114 { .procname = "rds", },
121 { .procname = "iw", .ctl_name = CTL_UNNUMBERED, }, 115 { .procname = "iw", },
122 { } 116 { }
123}; 117};
124 118
diff --git a/net/rds/sysctl.c b/net/rds/sysctl.c
index 307dc5c1be15..7829a20325d3 100644
--- a/net/rds/sysctl.c
+++ b/net/rds/sysctl.c
@@ -51,55 +51,50 @@ unsigned int rds_sysctl_ping_enable = 1;
51 51
52static ctl_table rds_sysctl_rds_table[] = { 52static ctl_table rds_sysctl_rds_table[] = {
53 { 53 {
54 .ctl_name = CTL_UNNUMBERED,
55 .procname = "reconnect_min_delay_ms", 54 .procname = "reconnect_min_delay_ms",
56 .data = &rds_sysctl_reconnect_min_jiffies, 55 .data = &rds_sysctl_reconnect_min_jiffies,
57 .maxlen = sizeof(unsigned long), 56 .maxlen = sizeof(unsigned long),
58 .mode = 0644, 57 .mode = 0644,
59 .proc_handler = &proc_doulongvec_ms_jiffies_minmax, 58 .proc_handler = proc_doulongvec_ms_jiffies_minmax,
60 .extra1 = &rds_sysctl_reconnect_min, 59 .extra1 = &rds_sysctl_reconnect_min,
61 .extra2 = &rds_sysctl_reconnect_max_jiffies, 60 .extra2 = &rds_sysctl_reconnect_max_jiffies,
62 }, 61 },
63 { 62 {
64 .ctl_name = CTL_UNNUMBERED,
65 .procname = "reconnect_max_delay_ms", 63 .procname = "reconnect_max_delay_ms",
66 .data = &rds_sysctl_reconnect_max_jiffies, 64 .data = &rds_sysctl_reconnect_max_jiffies,
67 .maxlen = sizeof(unsigned long), 65 .maxlen = sizeof(unsigned long),
68 .mode = 0644, 66 .mode = 0644,
69 .proc_handler = &proc_doulongvec_ms_jiffies_minmax, 67 .proc_handler = proc_doulongvec_ms_jiffies_minmax,
70 .extra1 = &rds_sysctl_reconnect_min_jiffies, 68 .extra1 = &rds_sysctl_reconnect_min_jiffies,
71 .extra2 = &rds_sysctl_reconnect_max, 69 .extra2 = &rds_sysctl_reconnect_max,
72 }, 70 },
73 { 71 {
74 .ctl_name = CTL_UNNUMBERED,
75 .procname = "max_unacked_packets", 72 .procname = "max_unacked_packets",
76 .data = &rds_sysctl_max_unacked_packets, 73 .data = &rds_sysctl_max_unacked_packets,
77 .maxlen = sizeof(unsigned long), 74 .maxlen = sizeof(unsigned long),
78 .mode = 0644, 75 .mode = 0644,
79 .proc_handler = &proc_dointvec, 76 .proc_handler = proc_dointvec,
80 }, 77 },
81 { 78 {
82 .ctl_name = CTL_UNNUMBERED,
83 .procname = "max_unacked_bytes", 79 .procname = "max_unacked_bytes",
84 .data = &rds_sysctl_max_unacked_bytes, 80 .data = &rds_sysctl_max_unacked_bytes,
85 .maxlen = sizeof(unsigned long), 81 .maxlen = sizeof(unsigned long),
86 .mode = 0644, 82 .mode = 0644,
87 .proc_handler = &proc_dointvec, 83 .proc_handler = proc_dointvec,
88 }, 84 },
89 { 85 {
90 .ctl_name = CTL_UNNUMBERED,
91 .procname = "ping_enable", 86 .procname = "ping_enable",
92 .data = &rds_sysctl_ping_enable, 87 .data = &rds_sysctl_ping_enable,
93 .maxlen = sizeof(int), 88 .maxlen = sizeof(int),
94 .mode = 0644, 89 .mode = 0644,
95 .proc_handler = &proc_dointvec, 90 .proc_handler = proc_dointvec,
96 }, 91 },
97 { .ctl_name = 0} 92 { }
98}; 93};
99 94
100static struct ctl_path rds_sysctl_path[] = { 95static struct ctl_path rds_sysctl_path[] = {
101 { .procname = "net", .ctl_name = CTL_NET, }, 96 { .procname = "net", },
102 { .procname = "rds", .ctl_name = CTL_UNNUMBERED, }, 97 { .procname = "rds", },
103 { } 98 { }
104}; 99};
105 100
diff --git a/net/rose/sysctl_net_rose.c b/net/rose/sysctl_net_rose.c
index 3bfe504faf86..df6d9dac2186 100644
--- a/net/rose/sysctl_net_rose.c
+++ b/net/rose/sysctl_net_rose.c
@@ -26,121 +26,101 @@ static struct ctl_table_header *rose_table_header;
26 26
27static ctl_table rose_table[] = { 27static ctl_table rose_table[] = {
28 { 28 {
29 .ctl_name = NET_ROSE_RESTART_REQUEST_TIMEOUT,
30 .procname = "restart_request_timeout", 29 .procname = "restart_request_timeout",
31 .data = &sysctl_rose_restart_request_timeout, 30 .data = &sysctl_rose_restart_request_timeout,
32 .maxlen = sizeof(int), 31 .maxlen = sizeof(int),
33 .mode = 0644, 32 .mode = 0644,
34 .proc_handler = proc_dointvec_minmax, 33 .proc_handler = proc_dointvec_minmax,
35 .strategy = sysctl_intvec,
36 .extra1 = &min_timer, 34 .extra1 = &min_timer,
37 .extra2 = &max_timer 35 .extra2 = &max_timer
38 }, 36 },
39 { 37 {
40 .ctl_name = NET_ROSE_CALL_REQUEST_TIMEOUT,
41 .procname = "call_request_timeout", 38 .procname = "call_request_timeout",
42 .data = &sysctl_rose_call_request_timeout, 39 .data = &sysctl_rose_call_request_timeout,
43 .maxlen = sizeof(int), 40 .maxlen = sizeof(int),
44 .mode = 0644, 41 .mode = 0644,
45 .proc_handler = proc_dointvec_minmax, 42 .proc_handler = proc_dointvec_minmax,
46 .strategy = sysctl_intvec,
47 .extra1 = &min_timer, 43 .extra1 = &min_timer,
48 .extra2 = &max_timer 44 .extra2 = &max_timer
49 }, 45 },
50 { 46 {
51 .ctl_name = NET_ROSE_RESET_REQUEST_TIMEOUT,
52 .procname = "reset_request_timeout", 47 .procname = "reset_request_timeout",
53 .data = &sysctl_rose_reset_request_timeout, 48 .data = &sysctl_rose_reset_request_timeout,
54 .maxlen = sizeof(int), 49 .maxlen = sizeof(int),
55 .mode = 0644, 50 .mode = 0644,
56 .proc_handler = proc_dointvec_minmax, 51 .proc_handler = proc_dointvec_minmax,
57 .strategy = sysctl_intvec,
58 .extra1 = &min_timer, 52 .extra1 = &min_timer,
59 .extra2 = &max_timer 53 .extra2 = &max_timer
60 }, 54 },
61 { 55 {
62 .ctl_name = NET_ROSE_CLEAR_REQUEST_TIMEOUT,
63 .procname = "clear_request_timeout", 56 .procname = "clear_request_timeout",
64 .data = &sysctl_rose_clear_request_timeout, 57 .data = &sysctl_rose_clear_request_timeout,
65 .maxlen = sizeof(int), 58 .maxlen = sizeof(int),
66 .mode = 0644, 59 .mode = 0644,
67 .proc_handler = proc_dointvec_minmax, 60 .proc_handler = proc_dointvec_minmax,
68 .strategy = sysctl_intvec,
69 .extra1 = &min_timer, 61 .extra1 = &min_timer,
70 .extra2 = &max_timer 62 .extra2 = &max_timer
71 }, 63 },
72 { 64 {
73 .ctl_name = NET_ROSE_NO_ACTIVITY_TIMEOUT,
74 .procname = "no_activity_timeout", 65 .procname = "no_activity_timeout",
75 .data = &sysctl_rose_no_activity_timeout, 66 .data = &sysctl_rose_no_activity_timeout,
76 .maxlen = sizeof(int), 67 .maxlen = sizeof(int),
77 .mode = 0644, 68 .mode = 0644,
78 .proc_handler = proc_dointvec_minmax, 69 .proc_handler = proc_dointvec_minmax,
79 .strategy = sysctl_intvec,
80 .extra1 = &min_idle, 70 .extra1 = &min_idle,
81 .extra2 = &max_idle 71 .extra2 = &max_idle
82 }, 72 },
83 { 73 {
84 .ctl_name = NET_ROSE_ACK_HOLD_BACK_TIMEOUT,
85 .procname = "acknowledge_hold_back_timeout", 74 .procname = "acknowledge_hold_back_timeout",
86 .data = &sysctl_rose_ack_hold_back_timeout, 75 .data = &sysctl_rose_ack_hold_back_timeout,
87 .maxlen = sizeof(int), 76 .maxlen = sizeof(int),
88 .mode = 0644, 77 .mode = 0644,
89 .proc_handler = proc_dointvec_minmax, 78 .proc_handler = proc_dointvec_minmax,
90 .strategy = sysctl_intvec,
91 .extra1 = &min_timer, 79 .extra1 = &min_timer,
92 .extra2 = &max_timer 80 .extra2 = &max_timer
93 }, 81 },
94 { 82 {
95 .ctl_name = NET_ROSE_ROUTING_CONTROL,
96 .procname = "routing_control", 83 .procname = "routing_control",
97 .data = &sysctl_rose_routing_control, 84 .data = &sysctl_rose_routing_control,
98 .maxlen = sizeof(int), 85 .maxlen = sizeof(int),
99 .mode = 0644, 86 .mode = 0644,
100 .proc_handler = proc_dointvec_minmax, 87 .proc_handler = proc_dointvec_minmax,
101 .strategy = sysctl_intvec,
102 .extra1 = &min_route, 88 .extra1 = &min_route,
103 .extra2 = &max_route 89 .extra2 = &max_route
104 }, 90 },
105 { 91 {
106 .ctl_name = NET_ROSE_LINK_FAIL_TIMEOUT,
107 .procname = "link_fail_timeout", 92 .procname = "link_fail_timeout",
108 .data = &sysctl_rose_link_fail_timeout, 93 .data = &sysctl_rose_link_fail_timeout,
109 .maxlen = sizeof(int), 94 .maxlen = sizeof(int),
110 .mode = 0644, 95 .mode = 0644,
111 .proc_handler = proc_dointvec_minmax, 96 .proc_handler = proc_dointvec_minmax,
112 .strategy = sysctl_intvec,
113 .extra1 = &min_ftimer, 97 .extra1 = &min_ftimer,
114 .extra2 = &max_ftimer 98 .extra2 = &max_ftimer
115 }, 99 },
116 { 100 {
117 .ctl_name = NET_ROSE_MAX_VCS,
118 .procname = "maximum_virtual_circuits", 101 .procname = "maximum_virtual_circuits",
119 .data = &sysctl_rose_maximum_vcs, 102 .data = &sysctl_rose_maximum_vcs,
120 .maxlen = sizeof(int), 103 .maxlen = sizeof(int),
121 .mode = 0644, 104 .mode = 0644,
122 .proc_handler = proc_dointvec_minmax, 105 .proc_handler = proc_dointvec_minmax,
123 .strategy = sysctl_intvec,
124 .extra1 = &min_maxvcs, 106 .extra1 = &min_maxvcs,
125 .extra2 = &max_maxvcs 107 .extra2 = &max_maxvcs
126 }, 108 },
127 { 109 {
128 .ctl_name = NET_ROSE_WINDOW_SIZE,
129 .procname = "window_size", 110 .procname = "window_size",
130 .data = &sysctl_rose_window_size, 111 .data = &sysctl_rose_window_size,
131 .maxlen = sizeof(int), 112 .maxlen = sizeof(int),
132 .mode = 0644, 113 .mode = 0644,
133 .proc_handler = proc_dointvec_minmax, 114 .proc_handler = proc_dointvec_minmax,
134 .strategy = sysctl_intvec,
135 .extra1 = &min_window, 115 .extra1 = &min_window,
136 .extra2 = &max_window 116 .extra2 = &max_window
137 }, 117 },
138 { .ctl_name = 0 } 118 { }
139}; 119};
140 120
141static struct ctl_path rose_path[] = { 121static struct ctl_path rose_path[] = {
142 { .procname = "net", .ctl_name = CTL_NET, }, 122 { .procname = "net", },
143 { .procname = "rose", .ctl_name = NET_ROSE, }, 123 { .procname = "rose", },
144 { } 124 { }
145}; 125};
146 126
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index ae03ded2bf1a..419e1e962c55 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -60,180 +60,145 @@ extern int sysctl_sctp_wmem[3];
60 60
61static ctl_table sctp_table[] = { 61static ctl_table sctp_table[] = {
62 { 62 {
63 .ctl_name = NET_SCTP_RTO_INITIAL,
64 .procname = "rto_initial", 63 .procname = "rto_initial",
65 .data = &sctp_rto_initial, 64 .data = &sctp_rto_initial,
66 .maxlen = sizeof(unsigned int), 65 .maxlen = sizeof(unsigned int),
67 .mode = 0644, 66 .mode = 0644,
68 .proc_handler = proc_dointvec_minmax, 67 .proc_handler = proc_dointvec_minmax,
69 .strategy = sysctl_intvec,
70 .extra1 = &one, 68 .extra1 = &one,
71 .extra2 = &timer_max 69 .extra2 = &timer_max
72 }, 70 },
73 { 71 {
74 .ctl_name = NET_SCTP_RTO_MIN,
75 .procname = "rto_min", 72 .procname = "rto_min",
76 .data = &sctp_rto_min, 73 .data = &sctp_rto_min,
77 .maxlen = sizeof(unsigned int), 74 .maxlen = sizeof(unsigned int),
78 .mode = 0644, 75 .mode = 0644,
79 .proc_handler = proc_dointvec_minmax, 76 .proc_handler = proc_dointvec_minmax,
80 .strategy = sysctl_intvec,
81 .extra1 = &one, 77 .extra1 = &one,
82 .extra2 = &timer_max 78 .extra2 = &timer_max
83 }, 79 },
84 { 80 {
85 .ctl_name = NET_SCTP_RTO_MAX,
86 .procname = "rto_max", 81 .procname = "rto_max",
87 .data = &sctp_rto_max, 82 .data = &sctp_rto_max,
88 .maxlen = sizeof(unsigned int), 83 .maxlen = sizeof(unsigned int),
89 .mode = 0644, 84 .mode = 0644,
90 .proc_handler = proc_dointvec_minmax, 85 .proc_handler = proc_dointvec_minmax,
91 .strategy = sysctl_intvec,
92 .extra1 = &one, 86 .extra1 = &one,
93 .extra2 = &timer_max 87 .extra2 = &timer_max
94 }, 88 },
95 { 89 {
96 .ctl_name = NET_SCTP_VALID_COOKIE_LIFE,
97 .procname = "valid_cookie_life", 90 .procname = "valid_cookie_life",
98 .data = &sctp_valid_cookie_life, 91 .data = &sctp_valid_cookie_life,
99 .maxlen = sizeof(unsigned int), 92 .maxlen = sizeof(unsigned int),
100 .mode = 0644, 93 .mode = 0644,
101 .proc_handler = proc_dointvec_minmax, 94 .proc_handler = proc_dointvec_minmax,
102 .strategy = sysctl_intvec,
103 .extra1 = &one, 95 .extra1 = &one,
104 .extra2 = &timer_max 96 .extra2 = &timer_max
105 }, 97 },
106 { 98 {
107 .ctl_name = NET_SCTP_MAX_BURST,
108 .procname = "max_burst", 99 .procname = "max_burst",
109 .data = &sctp_max_burst, 100 .data = &sctp_max_burst,
110 .maxlen = sizeof(int), 101 .maxlen = sizeof(int),
111 .mode = 0644, 102 .mode = 0644,
112 .proc_handler = proc_dointvec_minmax, 103 .proc_handler = proc_dointvec_minmax,
113 .strategy = sysctl_intvec,
114 .extra1 = &zero, 104 .extra1 = &zero,
115 .extra2 = &int_max 105 .extra2 = &int_max
116 }, 106 },
117 { 107 {
118 .ctl_name = NET_SCTP_ASSOCIATION_MAX_RETRANS,
119 .procname = "association_max_retrans", 108 .procname = "association_max_retrans",
120 .data = &sctp_max_retrans_association, 109 .data = &sctp_max_retrans_association,
121 .maxlen = sizeof(int), 110 .maxlen = sizeof(int),
122 .mode = 0644, 111 .mode = 0644,
123 .proc_handler = proc_dointvec_minmax, 112 .proc_handler = proc_dointvec_minmax,
124 .strategy = sysctl_intvec,
125 .extra1 = &one, 113 .extra1 = &one,
126 .extra2 = &int_max 114 .extra2 = &int_max
127 }, 115 },
128 { 116 {
129 .ctl_name = NET_SCTP_SNDBUF_POLICY,
130 .procname = "sndbuf_policy", 117 .procname = "sndbuf_policy",
131 .data = &sctp_sndbuf_policy, 118 .data = &sctp_sndbuf_policy,
132 .maxlen = sizeof(int), 119 .maxlen = sizeof(int),
133 .mode = 0644, 120 .mode = 0644,
134 .proc_handler = proc_dointvec, 121 .proc_handler = proc_dointvec,
135 .strategy = sysctl_intvec
136 }, 122 },
137 { 123 {
138 .ctl_name = NET_SCTP_RCVBUF_POLICY,
139 .procname = "rcvbuf_policy", 124 .procname = "rcvbuf_policy",
140 .data = &sctp_rcvbuf_policy, 125 .data = &sctp_rcvbuf_policy,
141 .maxlen = sizeof(int), 126 .maxlen = sizeof(int),
142 .mode = 0644, 127 .mode = 0644,
143 .proc_handler = proc_dointvec, 128 .proc_handler = proc_dointvec,
144 .strategy = sysctl_intvec
145 }, 129 },
146 { 130 {
147 .ctl_name = NET_SCTP_PATH_MAX_RETRANS,
148 .procname = "path_max_retrans", 131 .procname = "path_max_retrans",
149 .data = &sctp_max_retrans_path, 132 .data = &sctp_max_retrans_path,
150 .maxlen = sizeof(int), 133 .maxlen = sizeof(int),
151 .mode = 0644, 134 .mode = 0644,
152 .proc_handler = proc_dointvec_minmax, 135 .proc_handler = proc_dointvec_minmax,
153 .strategy = sysctl_intvec,
154 .extra1 = &one, 136 .extra1 = &one,
155 .extra2 = &int_max 137 .extra2 = &int_max
156 }, 138 },
157 { 139 {
158 .ctl_name = NET_SCTP_MAX_INIT_RETRANSMITS,
159 .procname = "max_init_retransmits", 140 .procname = "max_init_retransmits",
160 .data = &sctp_max_retrans_init, 141 .data = &sctp_max_retrans_init,
161 .maxlen = sizeof(int), 142 .maxlen = sizeof(int),
162 .mode = 0644, 143 .mode = 0644,
163 .proc_handler = proc_dointvec_minmax, 144 .proc_handler = proc_dointvec_minmax,
164 .strategy = sysctl_intvec,
165 .extra1 = &one, 145 .extra1 = &one,
166 .extra2 = &int_max 146 .extra2 = &int_max
167 }, 147 },
168 { 148 {
169 .ctl_name = NET_SCTP_HB_INTERVAL,
170 .procname = "hb_interval", 149 .procname = "hb_interval",
171 .data = &sctp_hb_interval, 150 .data = &sctp_hb_interval,
172 .maxlen = sizeof(unsigned int), 151 .maxlen = sizeof(unsigned int),
173 .mode = 0644, 152 .mode = 0644,
174 .proc_handler = proc_dointvec_minmax, 153 .proc_handler = proc_dointvec_minmax,
175 .strategy = sysctl_intvec,
176 .extra1 = &one, 154 .extra1 = &one,
177 .extra2 = &timer_max 155 .extra2 = &timer_max
178 }, 156 },
179 { 157 {
180 .ctl_name = NET_SCTP_PRESERVE_ENABLE,
181 .procname = "cookie_preserve_enable", 158 .procname = "cookie_preserve_enable",
182 .data = &sctp_cookie_preserve_enable, 159 .data = &sctp_cookie_preserve_enable,
183 .maxlen = sizeof(int), 160 .maxlen = sizeof(int),
184 .mode = 0644, 161 .mode = 0644,
185 .proc_handler = proc_dointvec, 162 .proc_handler = proc_dointvec,
186 .strategy = sysctl_intvec
187 }, 163 },
188 { 164 {
189 .ctl_name = NET_SCTP_RTO_ALPHA,
190 .procname = "rto_alpha_exp_divisor", 165 .procname = "rto_alpha_exp_divisor",
191 .data = &sctp_rto_alpha, 166 .data = &sctp_rto_alpha,
192 .maxlen = sizeof(int), 167 .maxlen = sizeof(int),
193 .mode = 0444, 168 .mode = 0444,
194 .proc_handler = proc_dointvec, 169 .proc_handler = proc_dointvec,
195 .strategy = sysctl_intvec
196 }, 170 },
197 { 171 {
198 .ctl_name = NET_SCTP_RTO_BETA,
199 .procname = "rto_beta_exp_divisor", 172 .procname = "rto_beta_exp_divisor",
200 .data = &sctp_rto_beta, 173 .data = &sctp_rto_beta,
201 .maxlen = sizeof(int), 174 .maxlen = sizeof(int),
202 .mode = 0444, 175 .mode = 0444,
203 .proc_handler = proc_dointvec, 176 .proc_handler = proc_dointvec,
204 .strategy = sysctl_intvec
205 }, 177 },
206 { 178 {
207 .ctl_name = NET_SCTP_ADDIP_ENABLE,
208 .procname = "addip_enable", 179 .procname = "addip_enable",
209 .data = &sctp_addip_enable, 180 .data = &sctp_addip_enable,
210 .maxlen = sizeof(int), 181 .maxlen = sizeof(int),
211 .mode = 0644, 182 .mode = 0644,
212 .proc_handler = proc_dointvec, 183 .proc_handler = proc_dointvec,
213 .strategy = sysctl_intvec
214 }, 184 },
215 { 185 {
216 .ctl_name = NET_SCTP_PRSCTP_ENABLE,
217 .procname = "prsctp_enable", 186 .procname = "prsctp_enable",
218 .data = &sctp_prsctp_enable, 187 .data = &sctp_prsctp_enable,
219 .maxlen = sizeof(int), 188 .maxlen = sizeof(int),
220 .mode = 0644, 189 .mode = 0644,
221 .proc_handler = proc_dointvec, 190 .proc_handler = proc_dointvec,
222 .strategy = sysctl_intvec
223 }, 191 },
224 { 192 {
225 .ctl_name = NET_SCTP_SACK_TIMEOUT,
226 .procname = "sack_timeout", 193 .procname = "sack_timeout",
227 .data = &sctp_sack_timeout, 194 .data = &sctp_sack_timeout,
228 .maxlen = sizeof(int), 195 .maxlen = sizeof(int),
229 .mode = 0644, 196 .mode = 0644,
230 .proc_handler = proc_dointvec_minmax, 197 .proc_handler = proc_dointvec_minmax,
231 .strategy = sysctl_intvec,
232 .extra1 = &sack_timer_min, 198 .extra1 = &sack_timer_min,
233 .extra2 = &sack_timer_max, 199 .extra2 = &sack_timer_max,
234 }, 200 },
235 { 201 {
236 .ctl_name = CTL_UNNUMBERED,
237 .procname = "sctp_mem", 202 .procname = "sctp_mem",
238 .data = &sysctl_sctp_mem, 203 .data = &sysctl_sctp_mem,
239 .maxlen = sizeof(sysctl_sctp_mem), 204 .maxlen = sizeof(sysctl_sctp_mem),
@@ -241,7 +206,6 @@ static ctl_table sctp_table[] = {
241 .proc_handler = proc_dointvec, 206 .proc_handler = proc_dointvec,
242 }, 207 },
243 { 208 {
244 .ctl_name = CTL_UNNUMBERED,
245 .procname = "sctp_rmem", 209 .procname = "sctp_rmem",
246 .data = &sysctl_sctp_rmem, 210 .data = &sysctl_sctp_rmem,
247 .maxlen = sizeof(sysctl_sctp_rmem), 211 .maxlen = sizeof(sysctl_sctp_rmem),
@@ -249,7 +213,6 @@ static ctl_table sctp_table[] = {
249 .proc_handler = proc_dointvec, 213 .proc_handler = proc_dointvec,
250 }, 214 },
251 { 215 {
252 .ctl_name = CTL_UNNUMBERED,
253 .procname = "sctp_wmem", 216 .procname = "sctp_wmem",
254 .data = &sysctl_sctp_wmem, 217 .data = &sysctl_sctp_wmem,
255 .maxlen = sizeof(sysctl_sctp_wmem), 218 .maxlen = sizeof(sysctl_sctp_wmem),
@@ -257,36 +220,29 @@ static ctl_table sctp_table[] = {
257 .proc_handler = proc_dointvec, 220 .proc_handler = proc_dointvec,
258 }, 221 },
259 { 222 {
260 .ctl_name = CTL_UNNUMBERED,
261 .procname = "auth_enable", 223 .procname = "auth_enable",
262 .data = &sctp_auth_enable, 224 .data = &sctp_auth_enable,
263 .maxlen = sizeof(int), 225 .maxlen = sizeof(int),
264 .mode = 0644, 226 .mode = 0644,
265 .proc_handler = proc_dointvec, 227 .proc_handler = proc_dointvec,
266 .strategy = sysctl_intvec
267 }, 228 },
268 { 229 {
269 .ctl_name = CTL_UNNUMBERED,
270 .procname = "addip_noauth_enable", 230 .procname = "addip_noauth_enable",
271 .data = &sctp_addip_noauth, 231 .data = &sctp_addip_noauth,
272 .maxlen = sizeof(int), 232 .maxlen = sizeof(int),
273 .mode = 0644, 233 .mode = 0644,
274 .proc_handler = proc_dointvec, 234 .proc_handler = proc_dointvec,
275 .strategy = sysctl_intvec
276 }, 235 },
277 { 236 {
278 .ctl_name = CTL_UNNUMBERED,
279 .procname = "addr_scope_policy", 237 .procname = "addr_scope_policy",
280 .data = &sctp_scope_policy, 238 .data = &sctp_scope_policy,
281 .maxlen = sizeof(int), 239 .maxlen = sizeof(int),
282 .mode = 0644, 240 .mode = 0644,
283 .proc_handler = &proc_dointvec_minmax, 241 .proc_handler = proc_dointvec_minmax,
284 .strategy = &sysctl_intvec,
285 .extra1 = &zero, 242 .extra1 = &zero,
286 .extra2 = &addr_scope_max, 243 .extra2 = &addr_scope_max,
287 }, 244 },
288 { 245 {
289 .ctl_name = CTL_UNNUMBERED,
290 .procname = "rwnd_update_shift", 246 .procname = "rwnd_update_shift",
291 .data = &sctp_rwnd_upd_shift, 247 .data = &sctp_rwnd_upd_shift,
292 .maxlen = sizeof(int), 248 .maxlen = sizeof(int),
@@ -297,12 +253,12 @@ static ctl_table sctp_table[] = {
297 .extra2 = &rwnd_scale_max, 253 .extra2 = &rwnd_scale_max,
298 }, 254 },
299 255
300 { .ctl_name = 0 } 256 { /* sentinel */ }
301}; 257};
302 258
303static struct ctl_path sctp_path[] = { 259static struct ctl_path sctp_path[] = {
304 { .procname = "net", .ctl_name = CTL_NET, }, 260 { .procname = "net", },
305 { .procname = "sctp", .ctl_name = NET_SCTP, }, 261 { .procname = "sctp", },
306 { } 262 { }
307}; 263};
308 264
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 42f9748ae093..e65dcc613339 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -139,46 +139,45 @@ static ctl_table debug_table[] = {
139 .data = &rpc_debug, 139 .data = &rpc_debug,
140 .maxlen = sizeof(int), 140 .maxlen = sizeof(int),
141 .mode = 0644, 141 .mode = 0644,
142 .proc_handler = &proc_dodebug 142 .proc_handler = proc_dodebug
143 }, 143 },
144 { 144 {
145 .procname = "nfs_debug", 145 .procname = "nfs_debug",
146 .data = &nfs_debug, 146 .data = &nfs_debug,
147 .maxlen = sizeof(int), 147 .maxlen = sizeof(int),
148 .mode = 0644, 148 .mode = 0644,
149 .proc_handler = &proc_dodebug 149 .proc_handler = proc_dodebug
150 }, 150 },
151 { 151 {
152 .procname = "nfsd_debug", 152 .procname = "nfsd_debug",
153 .data = &nfsd_debug, 153 .data = &nfsd_debug,
154 .maxlen = sizeof(int), 154 .maxlen = sizeof(int),
155 .mode = 0644, 155 .mode = 0644,
156 .proc_handler = &proc_dodebug 156 .proc_handler = proc_dodebug
157 }, 157 },
158 { 158 {
159 .procname = "nlm_debug", 159 .procname = "nlm_debug",
160 .data = &nlm_debug, 160 .data = &nlm_debug,
161 .maxlen = sizeof(int), 161 .maxlen = sizeof(int),
162 .mode = 0644, 162 .mode = 0644,
163 .proc_handler = &proc_dodebug 163 .proc_handler = proc_dodebug
164 }, 164 },
165 { 165 {
166 .procname = "transports", 166 .procname = "transports",
167 .maxlen = 256, 167 .maxlen = 256,
168 .mode = 0444, 168 .mode = 0444,
169 .proc_handler = &proc_do_xprt, 169 .proc_handler = proc_do_xprt,
170 }, 170 },
171 { .ctl_name = 0 } 171 { }
172}; 172};
173 173
174static ctl_table sunrpc_table[] = { 174static ctl_table sunrpc_table[] = {
175 { 175 {
176 .ctl_name = CTL_SUNRPC,
177 .procname = "sunrpc", 176 .procname = "sunrpc",
178 .mode = 0555, 177 .mode = 0555,
179 .child = debug_table 178 .child = debug_table
180 }, 179 },
181 { .ctl_name = 0 } 180 { }
182}; 181};
183 182
184#endif 183#endif
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
index 35fb68b9c8ec..5b8a8ff93a25 100644
--- a/net/sunrpc/xprtrdma/svc_rdma.c
+++ b/net/sunrpc/xprtrdma/svc_rdma.c
@@ -120,8 +120,7 @@ static ctl_table svcrdma_parm_table[] = {
120 .data = &svcrdma_max_requests, 120 .data = &svcrdma_max_requests,
121 .maxlen = sizeof(unsigned int), 121 .maxlen = sizeof(unsigned int),
122 .mode = 0644, 122 .mode = 0644,
123 .proc_handler = &proc_dointvec_minmax, 123 .proc_handler = proc_dointvec_minmax,
124 .strategy = &sysctl_intvec,
125 .extra1 = &min_max_requests, 124 .extra1 = &min_max_requests,
126 .extra2 = &max_max_requests 125 .extra2 = &max_max_requests
127 }, 126 },
@@ -130,8 +129,7 @@ static ctl_table svcrdma_parm_table[] = {
130 .data = &svcrdma_max_req_size, 129 .data = &svcrdma_max_req_size,
131 .maxlen = sizeof(unsigned int), 130 .maxlen = sizeof(unsigned int),
132 .mode = 0644, 131 .mode = 0644,
133 .proc_handler = &proc_dointvec_minmax, 132 .proc_handler = proc_dointvec_minmax,
134 .strategy = &sysctl_intvec,
135 .extra1 = &min_max_inline, 133 .extra1 = &min_max_inline,
136 .extra2 = &max_max_inline 134 .extra2 = &max_max_inline
137 }, 135 },
@@ -140,8 +138,7 @@ static ctl_table svcrdma_parm_table[] = {
140 .data = &svcrdma_ord, 138 .data = &svcrdma_ord,
141 .maxlen = sizeof(unsigned int), 139 .maxlen = sizeof(unsigned int),
142 .mode = 0644, 140 .mode = 0644,
143 .proc_handler = &proc_dointvec_minmax, 141 .proc_handler = proc_dointvec_minmax,
144 .strategy = &sysctl_intvec,
145 .extra1 = &min_ord, 142 .extra1 = &min_ord,
146 .extra2 = &max_ord, 143 .extra2 = &max_ord,
147 }, 144 },
@@ -151,67 +148,65 @@ static ctl_table svcrdma_parm_table[] = {
151 .data = &rdma_stat_read, 148 .data = &rdma_stat_read,
152 .maxlen = sizeof(atomic_t), 149 .maxlen = sizeof(atomic_t),
153 .mode = 0644, 150 .mode = 0644,
154 .proc_handler = &read_reset_stat, 151 .proc_handler = read_reset_stat,
155 }, 152 },
156 { 153 {
157 .procname = "rdma_stat_recv", 154 .procname = "rdma_stat_recv",
158 .data = &rdma_stat_recv, 155 .data = &rdma_stat_recv,
159 .maxlen = sizeof(atomic_t), 156 .maxlen = sizeof(atomic_t),
160 .mode = 0644, 157 .mode = 0644,
161 .proc_handler = &read_reset_stat, 158 .proc_handler = read_reset_stat,
162 }, 159 },
163 { 160 {
164 .procname = "rdma_stat_write", 161 .procname = "rdma_stat_write",
165 .data = &rdma_stat_write, 162 .data = &rdma_stat_write,
166 .maxlen = sizeof(atomic_t), 163 .maxlen = sizeof(atomic_t),
167 .mode = 0644, 164 .mode = 0644,
168 .proc_handler = &read_reset_stat, 165 .proc_handler = read_reset_stat,
169 }, 166 },
170 { 167 {
171 .procname = "rdma_stat_sq_starve", 168 .procname = "rdma_stat_sq_starve",
172 .data = &rdma_stat_sq_starve, 169 .data = &rdma_stat_sq_starve,
173 .maxlen = sizeof(atomic_t), 170 .maxlen = sizeof(atomic_t),
174 .mode = 0644, 171 .mode = 0644,
175 .proc_handler = &read_reset_stat, 172 .proc_handler = read_reset_stat,
176 }, 173 },
177 { 174 {
178 .procname = "rdma_stat_rq_starve", 175 .procname = "rdma_stat_rq_starve",
179 .data = &rdma_stat_rq_starve, 176 .data = &rdma_stat_rq_starve,
180 .maxlen = sizeof(atomic_t), 177 .maxlen = sizeof(atomic_t),
181 .mode = 0644, 178 .mode = 0644,
182 .proc_handler = &read_reset_stat, 179 .proc_handler = read_reset_stat,
183 }, 180 },
184 { 181 {
185 .procname = "rdma_stat_rq_poll", 182 .procname = "rdma_stat_rq_poll",
186 .data = &rdma_stat_rq_poll, 183 .data = &rdma_stat_rq_poll,
187 .maxlen = sizeof(atomic_t), 184 .maxlen = sizeof(atomic_t),
188 .mode = 0644, 185 .mode = 0644,
189 .proc_handler = &read_reset_stat, 186 .proc_handler = read_reset_stat,
190 }, 187 },
191 { 188 {
192 .procname = "rdma_stat_rq_prod", 189 .procname = "rdma_stat_rq_prod",
193 .data = &rdma_stat_rq_prod, 190 .data = &rdma_stat_rq_prod,
194 .maxlen = sizeof(atomic_t), 191 .maxlen = sizeof(atomic_t),
195 .mode = 0644, 192 .mode = 0644,
196 .proc_handler = &read_reset_stat, 193 .proc_handler = read_reset_stat,
197 }, 194 },
198 { 195 {
199 .procname = "rdma_stat_sq_poll", 196 .procname = "rdma_stat_sq_poll",
200 .data = &rdma_stat_sq_poll, 197 .data = &rdma_stat_sq_poll,
201 .maxlen = sizeof(atomic_t), 198 .maxlen = sizeof(atomic_t),
202 .mode = 0644, 199 .mode = 0644,
203 .proc_handler = &read_reset_stat, 200 .proc_handler = read_reset_stat,
204 }, 201 },
205 { 202 {
206 .procname = "rdma_stat_sq_prod", 203 .procname = "rdma_stat_sq_prod",
207 .data = &rdma_stat_sq_prod, 204 .data = &rdma_stat_sq_prod,
208 .maxlen = sizeof(atomic_t), 205 .maxlen = sizeof(atomic_t),
209 .mode = 0644, 206 .mode = 0644,
210 .proc_handler = &read_reset_stat, 207 .proc_handler = read_reset_stat,
211 },
212 {
213 .ctl_name = 0,
214 }, 208 },
209 { },
215}; 210};
216 211
217static ctl_table svcrdma_table[] = { 212static ctl_table svcrdma_table[] = {
@@ -220,21 +215,16 @@ static ctl_table svcrdma_table[] = {
220 .mode = 0555, 215 .mode = 0555,
221 .child = svcrdma_parm_table 216 .child = svcrdma_parm_table
222 }, 217 },
223 { 218 { },
224 .ctl_name = 0,
225 },
226}; 219};
227 220
228static ctl_table svcrdma_root_table[] = { 221static ctl_table svcrdma_root_table[] = {
229 { 222 {
230 .ctl_name = CTL_SUNRPC,
231 .procname = "sunrpc", 223 .procname = "sunrpc",
232 .mode = 0555, 224 .mode = 0555,
233 .child = svcrdma_table 225 .child = svcrdma_table
234 }, 226 },
235 { 227 { },
236 .ctl_name = 0,
237 },
238}; 228};
239 229
240void svc_rdma_cleanup(void) 230void svc_rdma_cleanup(void)
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index 9a63f669ece4..7018eef1dcdd 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -86,79 +86,63 @@ static struct ctl_table_header *sunrpc_table_header;
86 86
87static ctl_table xr_tunables_table[] = { 87static ctl_table xr_tunables_table[] = {
88 { 88 {
89 .ctl_name = CTL_UNNUMBERED,
90 .procname = "rdma_slot_table_entries", 89 .procname = "rdma_slot_table_entries",
91 .data = &xprt_rdma_slot_table_entries, 90 .data = &xprt_rdma_slot_table_entries,
92 .maxlen = sizeof(unsigned int), 91 .maxlen = sizeof(unsigned int),
93 .mode = 0644, 92 .mode = 0644,
94 .proc_handler = &proc_dointvec_minmax, 93 .proc_handler = proc_dointvec_minmax,
95 .strategy = &sysctl_intvec,
96 .extra1 = &min_slot_table_size, 94 .extra1 = &min_slot_table_size,
97 .extra2 = &max_slot_table_size 95 .extra2 = &max_slot_table_size
98 }, 96 },
99 { 97 {
100 .ctl_name = CTL_UNNUMBERED,
101 .procname = "rdma_max_inline_read", 98 .procname = "rdma_max_inline_read",
102 .data = &xprt_rdma_max_inline_read, 99 .data = &xprt_rdma_max_inline_read,
103 .maxlen = sizeof(unsigned int), 100 .maxlen = sizeof(unsigned int),
104 .mode = 0644, 101 .mode = 0644,
105 .proc_handler = &proc_dointvec, 102 .proc_handler = proc_dointvec,
106 .strategy = &sysctl_intvec,
107 }, 103 },
108 { 104 {
109 .ctl_name = CTL_UNNUMBERED,
110 .procname = "rdma_max_inline_write", 105 .procname = "rdma_max_inline_write",
111 .data = &xprt_rdma_max_inline_write, 106 .data = &xprt_rdma_max_inline_write,
112 .maxlen = sizeof(unsigned int), 107 .maxlen = sizeof(unsigned int),
113 .mode = 0644, 108 .mode = 0644,
114 .proc_handler = &proc_dointvec, 109 .proc_handler = proc_dointvec,
115 .strategy = &sysctl_intvec,
116 }, 110 },
117 { 111 {
118 .ctl_name = CTL_UNNUMBERED,
119 .procname = "rdma_inline_write_padding", 112 .procname = "rdma_inline_write_padding",
120 .data = &xprt_rdma_inline_write_padding, 113 .data = &xprt_rdma_inline_write_padding,
121 .maxlen = sizeof(unsigned int), 114 .maxlen = sizeof(unsigned int),
122 .mode = 0644, 115 .mode = 0644,
123 .proc_handler = &proc_dointvec_minmax, 116 .proc_handler = proc_dointvec_minmax,
124 .strategy = &sysctl_intvec,
125 .extra1 = &zero, 117 .extra1 = &zero,
126 .extra2 = &max_padding, 118 .extra2 = &max_padding,
127 }, 119 },
128 { 120 {
129 .ctl_name = CTL_UNNUMBERED,
130 .procname = "rdma_memreg_strategy", 121 .procname = "rdma_memreg_strategy",
131 .data = &xprt_rdma_memreg_strategy, 122 .data = &xprt_rdma_memreg_strategy,
132 .maxlen = sizeof(unsigned int), 123 .maxlen = sizeof(unsigned int),
133 .mode = 0644, 124 .mode = 0644,
134 .proc_handler = &proc_dointvec_minmax, 125 .proc_handler = proc_dointvec_minmax,
135 .strategy = &sysctl_intvec,
136 .extra1 = &min_memreg, 126 .extra1 = &min_memreg,
137 .extra2 = &max_memreg, 127 .extra2 = &max_memreg,
138 }, 128 },
139 { 129 {
140 .ctl_name = CTL_UNNUMBERED,
141 .procname = "rdma_pad_optimize", 130 .procname = "rdma_pad_optimize",
142 .data = &xprt_rdma_pad_optimize, 131 .data = &xprt_rdma_pad_optimize,
143 .maxlen = sizeof(unsigned int), 132 .maxlen = sizeof(unsigned int),
144 .mode = 0644, 133 .mode = 0644,
145 .proc_handler = &proc_dointvec, 134 .proc_handler = proc_dointvec,
146 },
147 {
148 .ctl_name = 0,
149 }, 135 },
136 { },
150}; 137};
151 138
152static ctl_table sunrpc_table[] = { 139static ctl_table sunrpc_table[] = {
153 { 140 {
154 .ctl_name = CTL_SUNRPC,
155 .procname = "sunrpc", 141 .procname = "sunrpc",
156 .mode = 0555, 142 .mode = 0555,
157 .child = xr_tunables_table 143 .child = xr_tunables_table
158 }, 144 },
159 { 145 { },
160 .ctl_name = 0,
161 },
162}; 146};
163 147
164#endif 148#endif
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 37c5475ba258..04732d09013e 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -81,46 +81,38 @@ static struct ctl_table_header *sunrpc_table_header;
81 */ 81 */
82static ctl_table xs_tunables_table[] = { 82static ctl_table xs_tunables_table[] = {
83 { 83 {
84 .ctl_name = CTL_SLOTTABLE_UDP,
85 .procname = "udp_slot_table_entries", 84 .procname = "udp_slot_table_entries",
86 .data = &xprt_udp_slot_table_entries, 85 .data = &xprt_udp_slot_table_entries,
87 .maxlen = sizeof(unsigned int), 86 .maxlen = sizeof(unsigned int),
88 .mode = 0644, 87 .mode = 0644,
89 .proc_handler = &proc_dointvec_minmax, 88 .proc_handler = proc_dointvec_minmax,
90 .strategy = &sysctl_intvec,
91 .extra1 = &min_slot_table_size, 89 .extra1 = &min_slot_table_size,
92 .extra2 = &max_slot_table_size 90 .extra2 = &max_slot_table_size
93 }, 91 },
94 { 92 {
95 .ctl_name = CTL_SLOTTABLE_TCP,
96 .procname = "tcp_slot_table_entries", 93 .procname = "tcp_slot_table_entries",
97 .data = &xprt_tcp_slot_table_entries, 94 .data = &xprt_tcp_slot_table_entries,
98 .maxlen = sizeof(unsigned int), 95 .maxlen = sizeof(unsigned int),
99 .mode = 0644, 96 .mode = 0644,
100 .proc_handler = &proc_dointvec_minmax, 97 .proc_handler = proc_dointvec_minmax,
101 .strategy = &sysctl_intvec,
102 .extra1 = &min_slot_table_size, 98 .extra1 = &min_slot_table_size,
103 .extra2 = &max_slot_table_size 99 .extra2 = &max_slot_table_size
104 }, 100 },
105 { 101 {
106 .ctl_name = CTL_MIN_RESVPORT,
107 .procname = "min_resvport", 102 .procname = "min_resvport",
108 .data = &xprt_min_resvport, 103 .data = &xprt_min_resvport,
109 .maxlen = sizeof(unsigned int), 104 .maxlen = sizeof(unsigned int),
110 .mode = 0644, 105 .mode = 0644,
111 .proc_handler = &proc_dointvec_minmax, 106 .proc_handler = proc_dointvec_minmax,
112 .strategy = &sysctl_intvec,
113 .extra1 = &xprt_min_resvport_limit, 107 .extra1 = &xprt_min_resvport_limit,
114 .extra2 = &xprt_max_resvport_limit 108 .extra2 = &xprt_max_resvport_limit
115 }, 109 },
116 { 110 {
117 .ctl_name = CTL_MAX_RESVPORT,
118 .procname = "max_resvport", 111 .procname = "max_resvport",
119 .data = &xprt_max_resvport, 112 .data = &xprt_max_resvport,
120 .maxlen = sizeof(unsigned int), 113 .maxlen = sizeof(unsigned int),
121 .mode = 0644, 114 .mode = 0644,
122 .proc_handler = &proc_dointvec_minmax, 115 .proc_handler = proc_dointvec_minmax,
123 .strategy = &sysctl_intvec,
124 .extra1 = &xprt_min_resvport_limit, 116 .extra1 = &xprt_min_resvport_limit,
125 .extra2 = &xprt_max_resvport_limit 117 .extra2 = &xprt_max_resvport_limit
126 }, 118 },
@@ -129,24 +121,18 @@ static ctl_table xs_tunables_table[] = {
129 .data = &xs_tcp_fin_timeout, 121 .data = &xs_tcp_fin_timeout,
130 .maxlen = sizeof(xs_tcp_fin_timeout), 122 .maxlen = sizeof(xs_tcp_fin_timeout),
131 .mode = 0644, 123 .mode = 0644,
132 .proc_handler = &proc_dointvec_jiffies, 124 .proc_handler = proc_dointvec_jiffies,
133 .strategy = sysctl_jiffies
134 },
135 {
136 .ctl_name = 0,
137 }, 125 },
126 { },
138}; 127};
139 128
140static ctl_table sunrpc_table[] = { 129static ctl_table sunrpc_table[] = {
141 { 130 {
142 .ctl_name = CTL_SUNRPC,
143 .procname = "sunrpc", 131 .procname = "sunrpc",
144 .mode = 0555, 132 .mode = 0555,
145 .child = xs_tunables_table 133 .child = xs_tunables_table
146 }, 134 },
147 { 135 { },
148 .ctl_name = 0,
149 },
150}; 136};
151 137
152#endif 138#endif
diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
index 83c093077ebc..708f5df6b7f0 100644
--- a/net/unix/sysctl_net_unix.c
+++ b/net/unix/sysctl_net_unix.c
@@ -16,19 +16,18 @@
16 16
17static ctl_table unix_table[] = { 17static ctl_table unix_table[] = {
18 { 18 {
19 .ctl_name = NET_UNIX_MAX_DGRAM_QLEN,
20 .procname = "max_dgram_qlen", 19 .procname = "max_dgram_qlen",
21 .data = &init_net.unx.sysctl_max_dgram_qlen, 20 .data = &init_net.unx.sysctl_max_dgram_qlen,
22 .maxlen = sizeof(int), 21 .maxlen = sizeof(int),
23 .mode = 0644, 22 .mode = 0644,
24 .proc_handler = proc_dointvec 23 .proc_handler = proc_dointvec
25 }, 24 },
26 { .ctl_name = 0 } 25 { }
27}; 26};
28 27
29static struct ctl_path unix_path[] = { 28static struct ctl_path unix_path[] = {
30 { .procname = "net", .ctl_name = CTL_NET, }, 29 { .procname = "net", },
31 { .procname = "unix", .ctl_name = NET_UNIX, }, 30 { .procname = "unix", },
32 { }, 31 { },
33}; 32};
34 33
diff --git a/net/x25/sysctl_net_x25.c b/net/x25/sysctl_net_x25.c
index a5d3416522de..d2efd29f434e 100644
--- a/net/x25/sysctl_net_x25.c
+++ b/net/x25/sysctl_net_x25.c
@@ -19,62 +19,51 @@ static struct ctl_table_header *x25_table_header;
19 19
20static struct ctl_table x25_table[] = { 20static struct ctl_table x25_table[] = {
21 { 21 {
22 .ctl_name = NET_X25_RESTART_REQUEST_TIMEOUT,
23 .procname = "restart_request_timeout", 22 .procname = "restart_request_timeout",
24 .data = &sysctl_x25_restart_request_timeout, 23 .data = &sysctl_x25_restart_request_timeout,
25 .maxlen = sizeof(int), 24 .maxlen = sizeof(int),
26 .mode = 0644, 25 .mode = 0644,
27 .proc_handler = proc_dointvec_minmax, 26 .proc_handler = proc_dointvec_minmax,
28 .strategy = sysctl_intvec,
29 .extra1 = &min_timer, 27 .extra1 = &min_timer,
30 .extra2 = &max_timer, 28 .extra2 = &max_timer,
31 }, 29 },
32 { 30 {
33 .ctl_name = NET_X25_CALL_REQUEST_TIMEOUT,
34 .procname = "call_request_timeout", 31 .procname = "call_request_timeout",
35 .data = &sysctl_x25_call_request_timeout, 32 .data = &sysctl_x25_call_request_timeout,
36 .maxlen = sizeof(int), 33 .maxlen = sizeof(int),
37 .mode = 0644, 34 .mode = 0644,
38 .proc_handler = proc_dointvec_minmax, 35 .proc_handler = proc_dointvec_minmax,
39 .strategy = sysctl_intvec,
40 .extra1 = &min_timer, 36 .extra1 = &min_timer,
41 .extra2 = &max_timer, 37 .extra2 = &max_timer,
42 }, 38 },
43 { 39 {
44 .ctl_name = NET_X25_RESET_REQUEST_TIMEOUT,
45 .procname = "reset_request_timeout", 40 .procname = "reset_request_timeout",
46 .data = &sysctl_x25_reset_request_timeout, 41 .data = &sysctl_x25_reset_request_timeout,
47 .maxlen = sizeof(int), 42 .maxlen = sizeof(int),
48 .mode = 0644, 43 .mode = 0644,
49 .proc_handler = proc_dointvec_minmax, 44 .proc_handler = proc_dointvec_minmax,
50 .strategy = sysctl_intvec,
51 .extra1 = &min_timer, 45 .extra1 = &min_timer,
52 .extra2 = &max_timer, 46 .extra2 = &max_timer,
53 }, 47 },
54 { 48 {
55 .ctl_name = NET_X25_CLEAR_REQUEST_TIMEOUT,
56 .procname = "clear_request_timeout", 49 .procname = "clear_request_timeout",
57 .data = &sysctl_x25_clear_request_timeout, 50 .data = &sysctl_x25_clear_request_timeout,
58 .maxlen = sizeof(int), 51 .maxlen = sizeof(int),
59 .mode = 0644, 52 .mode = 0644,
60 .proc_handler = proc_dointvec_minmax, 53 .proc_handler = proc_dointvec_minmax,
61 .strategy = sysctl_intvec,
62 .extra1 = &min_timer, 54 .extra1 = &min_timer,
63 .extra2 = &max_timer, 55 .extra2 = &max_timer,
64 }, 56 },
65 { 57 {
66 .ctl_name = NET_X25_ACK_HOLD_BACK_TIMEOUT,
67 .procname = "acknowledgement_hold_back_timeout", 58 .procname = "acknowledgement_hold_back_timeout",
68 .data = &sysctl_x25_ack_holdback_timeout, 59 .data = &sysctl_x25_ack_holdback_timeout,
69 .maxlen = sizeof(int), 60 .maxlen = sizeof(int),
70 .mode = 0644, 61 .mode = 0644,
71 .proc_handler = proc_dointvec_minmax, 62 .proc_handler = proc_dointvec_minmax,
72 .strategy = sysctl_intvec,
73 .extra1 = &min_timer, 63 .extra1 = &min_timer,
74 .extra2 = &max_timer, 64 .extra2 = &max_timer,
75 }, 65 },
76 { 66 {
77 .ctl_name = NET_X25_FORWARD,
78 .procname = "x25_forward", 67 .procname = "x25_forward",
79 .data = &sysctl_x25_forward, 68 .data = &sysctl_x25_forward,
80 .maxlen = sizeof(int), 69 .maxlen = sizeof(int),
@@ -85,8 +74,8 @@ static struct ctl_table x25_table[] = {
85}; 74};
86 75
87static struct ctl_path x25_path[] = { 76static struct ctl_path x25_path[] = {
88 { .procname = "net", .ctl_name = CTL_NET, }, 77 { .procname = "net", },
89 { .procname = "x25", .ctl_name = NET_X25, }, 78 { .procname = "x25", },
90 { } 79 { }
91}; 80};
92 81
diff --git a/net/xfrm/xfrm_sysctl.c b/net/xfrm/xfrm_sysctl.c
index 2e6ffb66f06f..2e221f2cad7e 100644
--- a/net/xfrm/xfrm_sysctl.c
+++ b/net/xfrm/xfrm_sysctl.c
@@ -13,28 +13,24 @@ static void __xfrm_sysctl_init(struct net *net)
13#ifdef CONFIG_SYSCTL 13#ifdef CONFIG_SYSCTL
14static struct ctl_table xfrm_table[] = { 14static struct ctl_table xfrm_table[] = {
15 { 15 {
16 .ctl_name = NET_CORE_AEVENT_ETIME,
17 .procname = "xfrm_aevent_etime", 16 .procname = "xfrm_aevent_etime",
18 .maxlen = sizeof(u32), 17 .maxlen = sizeof(u32),
19 .mode = 0644, 18 .mode = 0644,
20 .proc_handler = proc_dointvec 19 .proc_handler = proc_dointvec
21 }, 20 },
22 { 21 {
23 .ctl_name = NET_CORE_AEVENT_RSEQTH,
24 .procname = "xfrm_aevent_rseqth", 22 .procname = "xfrm_aevent_rseqth",
25 .maxlen = sizeof(u32), 23 .maxlen = sizeof(u32),
26 .mode = 0644, 24 .mode = 0644,
27 .proc_handler = proc_dointvec 25 .proc_handler = proc_dointvec
28 }, 26 },
29 { 27 {
30 .ctl_name = CTL_UNNUMBERED,
31 .procname = "xfrm_larval_drop", 28 .procname = "xfrm_larval_drop",
32 .maxlen = sizeof(int), 29 .maxlen = sizeof(int),
33 .mode = 0644, 30 .mode = 0644,
34 .proc_handler = proc_dointvec 31 .proc_handler = proc_dointvec
35 }, 32 },
36 { 33 {
37 .ctl_name = CTL_UNNUMBERED,
38 .procname = "xfrm_acq_expires", 34 .procname = "xfrm_acq_expires",
39 .maxlen = sizeof(int), 35 .maxlen = sizeof(int),
40 .mode = 0644, 36 .mode = 0644,