diff options
Diffstat (limited to 'net')
60 files changed, 161 insertions, 1127 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 |
636 | static struct ctl_table tr_table[] = { | 636 | static 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 | ||
648 | static __initdata struct ctl_path tr_path[] = { | 647 | static __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 | ||
13 | static struct ctl_table atalk_table[] = { | 13 | static 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 | ||
52 | static struct ctl_path atalk_path[] = { | 45 | static 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; | |||
34 | static int ax25_table_size; | 34 | static int ax25_table_size; |
35 | 35 | ||
36 | static struct ctl_path ax25_path[] = { | 36 | static 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 | ||
42 | static const ctl_table ax25_param_table[] = { | 42 | static 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 | ||
189 | void ax25_register_sysctl(void) | 161 | void 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 | ||
1019 | static struct ctl_path brnf_path[] = { | 1019 | static 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 e587e6819698..2b54e6c6a7c8 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 | ||
2700 | int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, | 2680 | int 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 7db1de0497c6..1ce4e6e85125 100644 --- a/net/core/sysctl_net_core.c +++ b/net/core/sysctl_net_core.c | |||
@@ -17,7 +17,6 @@ | |||
17 | static struct ctl_table net_core_table[] = { | 17 | static struct ctl_table net_core_table[] = { |
18 | #ifdef CONFIG_NET | 18 | #ifdef CONFIG_NET |
19 | { | 19 | { |
20 | .ctl_name = NET_CORE_WMEM_MAX, | ||
21 | .procname = "wmem_max", | 20 | .procname = "wmem_max", |
22 | .data = &sysctl_wmem_max, | 21 | .data = &sysctl_wmem_max, |
23 | .maxlen = sizeof(int), | 22 | .maxlen = sizeof(int), |
@@ -25,7 +24,6 @@ static struct ctl_table net_core_table[] = { | |||
25 | .proc_handler = proc_dointvec | 24 | .proc_handler = proc_dointvec |
26 | }, | 25 | }, |
27 | { | 26 | { |
28 | .ctl_name = NET_CORE_RMEM_MAX, | ||
29 | .procname = "rmem_max", | 27 | .procname = "rmem_max", |
30 | .data = &sysctl_rmem_max, | 28 | .data = &sysctl_rmem_max, |
31 | .maxlen = sizeof(int), | 29 | .maxlen = sizeof(int), |
@@ -33,7 +31,6 @@ static struct ctl_table net_core_table[] = { | |||
33 | .proc_handler = proc_dointvec | 31 | .proc_handler = proc_dointvec |
34 | }, | 32 | }, |
35 | { | 33 | { |
36 | .ctl_name = NET_CORE_WMEM_DEFAULT, | ||
37 | .procname = "wmem_default", | 34 | .procname = "wmem_default", |
38 | .data = &sysctl_wmem_default, | 35 | .data = &sysctl_wmem_default, |
39 | .maxlen = sizeof(int), | 36 | .maxlen = sizeof(int), |
@@ -41,7 +38,6 @@ static struct ctl_table net_core_table[] = { | |||
41 | .proc_handler = proc_dointvec | 38 | .proc_handler = proc_dointvec |
42 | }, | 39 | }, |
43 | { | 40 | { |
44 | .ctl_name = NET_CORE_RMEM_DEFAULT, | ||
45 | .procname = "rmem_default", | 41 | .procname = "rmem_default", |
46 | .data = &sysctl_rmem_default, | 42 | .data = &sysctl_rmem_default, |
47 | .maxlen = sizeof(int), | 43 | .maxlen = sizeof(int), |
@@ -49,7 +45,6 @@ static struct ctl_table net_core_table[] = { | |||
49 | .proc_handler = proc_dointvec | 45 | .proc_handler = proc_dointvec |
50 | }, | 46 | }, |
51 | { | 47 | { |
52 | .ctl_name = NET_CORE_DEV_WEIGHT, | ||
53 | .procname = "dev_weight", | 48 | .procname = "dev_weight", |
54 | .data = &weight_p, | 49 | .data = &weight_p, |
55 | .maxlen = sizeof(int), | 50 | .maxlen = sizeof(int), |
@@ -57,7 +52,6 @@ static struct ctl_table net_core_table[] = { | |||
57 | .proc_handler = proc_dointvec | 52 | .proc_handler = proc_dointvec |
58 | }, | 53 | }, |
59 | { | 54 | { |
60 | .ctl_name = NET_CORE_MAX_BACKLOG, | ||
61 | .procname = "netdev_max_backlog", | 55 | .procname = "netdev_max_backlog", |
62 | .data = &netdev_max_backlog, | 56 | .data = &netdev_max_backlog, |
63 | .maxlen = sizeof(int), | 57 | .maxlen = sizeof(int), |
@@ -65,16 +59,13 @@ static struct ctl_table net_core_table[] = { | |||
65 | .proc_handler = proc_dointvec | 59 | .proc_handler = proc_dointvec |
66 | }, | 60 | }, |
67 | { | 61 | { |
68 | .ctl_name = NET_CORE_MSG_COST, | ||
69 | .procname = "message_cost", | 62 | .procname = "message_cost", |
70 | .data = &net_ratelimit_state.interval, | 63 | .data = &net_ratelimit_state.interval, |
71 | .maxlen = sizeof(int), | 64 | .maxlen = sizeof(int), |
72 | .mode = 0644, | 65 | .mode = 0644, |
73 | .proc_handler = proc_dointvec_jiffies, | 66 | .proc_handler = proc_dointvec_jiffies, |
74 | .strategy = sysctl_jiffies, | ||
75 | }, | 67 | }, |
76 | { | 68 | { |
77 | .ctl_name = NET_CORE_MSG_BURST, | ||
78 | .procname = "message_burst", | 69 | .procname = "message_burst", |
79 | .data = &net_ratelimit_state.burst, | 70 | .data = &net_ratelimit_state.burst, |
80 | .maxlen = sizeof(int), | 71 | .maxlen = sizeof(int), |
@@ -82,7 +73,6 @@ static struct ctl_table net_core_table[] = { | |||
82 | .proc_handler = proc_dointvec, | 73 | .proc_handler = proc_dointvec, |
83 | }, | 74 | }, |
84 | { | 75 | { |
85 | .ctl_name = NET_CORE_OPTMEM_MAX, | ||
86 | .procname = "optmem_max", | 76 | .procname = "optmem_max", |
87 | .data = &sysctl_optmem_max, | 77 | .data = &sysctl_optmem_max, |
88 | .maxlen = sizeof(int), | 78 | .maxlen = sizeof(int), |
@@ -91,7 +81,6 @@ static struct ctl_table net_core_table[] = { | |||
91 | }, | 81 | }, |
92 | #endif /* CONFIG_NET */ | 82 | #endif /* CONFIG_NET */ |
93 | { | 83 | { |
94 | .ctl_name = NET_CORE_BUDGET, | ||
95 | .procname = "netdev_budget", | 84 | .procname = "netdev_budget", |
96 | .data = &netdev_budget, | 85 | .data = &netdev_budget, |
97 | .maxlen = sizeof(int), | 86 | .maxlen = sizeof(int), |
@@ -99,31 +88,29 @@ static struct ctl_table net_core_table[] = { | |||
99 | .proc_handler = proc_dointvec | 88 | .proc_handler = proc_dointvec |
100 | }, | 89 | }, |
101 | { | 90 | { |
102 | .ctl_name = NET_CORE_WARNINGS, | ||
103 | .procname = "warnings", | 91 | .procname = "warnings", |
104 | .data = &net_msg_warn, | 92 | .data = &net_msg_warn, |
105 | .maxlen = sizeof(int), | 93 | .maxlen = sizeof(int), |
106 | .mode = 0644, | 94 | .mode = 0644, |
107 | .proc_handler = proc_dointvec | 95 | .proc_handler = proc_dointvec |
108 | }, | 96 | }, |
109 | { .ctl_name = 0 } | 97 | { } |
110 | }; | 98 | }; |
111 | 99 | ||
112 | static struct ctl_table netns_core_table[] = { | 100 | static struct ctl_table netns_core_table[] = { |
113 | { | 101 | { |
114 | .ctl_name = NET_CORE_SOMAXCONN, | ||
115 | .procname = "somaxconn", | 102 | .procname = "somaxconn", |
116 | .data = &init_net.core.sysctl_somaxconn, | 103 | .data = &init_net.core.sysctl_somaxconn, |
117 | .maxlen = sizeof(int), | 104 | .maxlen = sizeof(int), |
118 | .mode = 0644, | 105 | .mode = 0644, |
119 | .proc_handler = proc_dointvec | 106 | .proc_handler = proc_dointvec |
120 | }, | 107 | }, |
121 | { .ctl_name = 0 } | 108 | { } |
122 | }; | 109 | }; |
123 | 110 | ||
124 | __net_initdata struct ctl_path net_core_path[] = { | 111 | __net_initdata struct ctl_path net_core_path[] = { |
125 | { .procname = "net", .ctl_name = CTL_NET, }, | 112 | { .procname = "net", }, |
126 | { .procname = "core", .ctl_name = NET_CORE, }, | 113 | { .procname = "core", }, |
127 | { }, | 114 | { }, |
128 | }; | 115 | }; |
129 | 116 | ||
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 | ||
99 | static struct ctl_path dccp_path[] = { | 99 | static 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 6e1f085db06a..1b1daeb151f2 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 | ||
167 | static int dn_forwarding_proc(ctl_table *, int, | 161 | static int dn_forwarding_proc(ctl_table *, int, |
168 | void __user *, size_t *, loff_t *); | 162 | void __user *, size_t *, loff_t *); |
169 | static int dn_forwarding_sysctl(ctl_table *table, | ||
170 | void __user *oldval, size_t __user *oldlenp, | ||
171 | void __user *newval, size_t newlen); | ||
172 | |||
173 | static struct dn_dev_sysctl_table { | 163 | static 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 | ||
320 | static 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 */ |
359 | static void dn_dev_sysctl_unregister(struct dn_dev_parms *parms) | 301 | static 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 26b0ab1e9f56..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 | |||
135 | static 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 | |||
167 | static int dn_node_address_handler(ctl_table *table, int write, | 134 | static 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,65 +182,6 @@ static int dn_node_address_handler(ctl_table *table, int write, | |||
215 | return 0; | 182 | return 0; |
216 | } | 183 | } |
217 | 184 | ||
218 | |||
219 | static 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 | |||
273 | return rv; | ||
274 | } | ||
275 | |||
276 | |||
277 | static int dn_def_dev_handler(ctl_table *table, int write, | 185 | static int dn_def_dev_handler(ctl_table *table, int write, |
278 | void __user *buffer, | 186 | void __user *buffer, |
279 | size_t *lenp, loff_t *ppos) | 187 | size_t *lenp, loff_t *ppos) |
@@ -339,138 +247,112 @@ static int dn_def_dev_handler(ctl_table *table, int write, | |||
339 | 247 | ||
340 | static ctl_table dn_table[] = { | 248 | static ctl_table dn_table[] = { |
341 | { | 249 | { |
342 | .ctl_name = NET_DECNET_NODE_ADDRESS, | ||
343 | .procname = "node_address", | 250 | .procname = "node_address", |
344 | .maxlen = 7, | 251 | .maxlen = 7, |
345 | .mode = 0644, | 252 | .mode = 0644, |
346 | .proc_handler = dn_node_address_handler, | 253 | .proc_handler = dn_node_address_handler, |
347 | .strategy = dn_node_address_strategy, | ||
348 | }, | 254 | }, |
349 | { | 255 | { |
350 | .ctl_name = NET_DECNET_NODE_NAME, | ||
351 | .procname = "node_name", | 256 | .procname = "node_name", |
352 | .data = node_name, | 257 | .data = node_name, |
353 | .maxlen = 7, | 258 | .maxlen = 7, |
354 | .mode = 0644, | 259 | .mode = 0644, |
355 | .proc_handler = proc_dostring, | 260 | .proc_handler = proc_dostring, |
356 | .strategy = sysctl_string, | ||
357 | }, | 261 | }, |
358 | { | 262 | { |
359 | .ctl_name = NET_DECNET_DEFAULT_DEVICE, | ||
360 | .procname = "default_device", | 263 | .procname = "default_device", |
361 | .maxlen = 16, | 264 | .maxlen = 16, |
362 | .mode = 0644, | 265 | .mode = 0644, |
363 | .proc_handler = dn_def_dev_handler, | 266 | .proc_handler = dn_def_dev_handler, |
364 | .strategy = dn_def_dev_strategy, | ||
365 | }, | 267 | }, |
366 | { | 268 | { |
367 | .ctl_name = NET_DECNET_TIME_WAIT, | ||
368 | .procname = "time_wait", | 269 | .procname = "time_wait", |
369 | .data = &decnet_time_wait, | 270 | .data = &decnet_time_wait, |
370 | .maxlen = sizeof(int), | 271 | .maxlen = sizeof(int), |
371 | .mode = 0644, | 272 | .mode = 0644, |
372 | .proc_handler = proc_dointvec_minmax, | 273 | .proc_handler = proc_dointvec_minmax, |
373 | .strategy = sysctl_intvec, | ||
374 | .extra1 = &min_decnet_time_wait, | 274 | .extra1 = &min_decnet_time_wait, |
375 | .extra2 = &max_decnet_time_wait | 275 | .extra2 = &max_decnet_time_wait |
376 | }, | 276 | }, |
377 | { | 277 | { |
378 | .ctl_name = NET_DECNET_DN_COUNT, | ||
379 | .procname = "dn_count", | 278 | .procname = "dn_count", |
380 | .data = &decnet_dn_count, | 279 | .data = &decnet_dn_count, |
381 | .maxlen = sizeof(int), | 280 | .maxlen = sizeof(int), |
382 | .mode = 0644, | 281 | .mode = 0644, |
383 | .proc_handler = proc_dointvec_minmax, | 282 | .proc_handler = proc_dointvec_minmax, |
384 | .strategy = sysctl_intvec, | ||
385 | .extra1 = &min_state_count, | 283 | .extra1 = &min_state_count, |
386 | .extra2 = &max_state_count | 284 | .extra2 = &max_state_count |
387 | }, | 285 | }, |
388 | { | 286 | { |
389 | .ctl_name = NET_DECNET_DI_COUNT, | ||
390 | .procname = "di_count", | 287 | .procname = "di_count", |
391 | .data = &decnet_di_count, | 288 | .data = &decnet_di_count, |
392 | .maxlen = sizeof(int), | 289 | .maxlen = sizeof(int), |
393 | .mode = 0644, | 290 | .mode = 0644, |
394 | .proc_handler = proc_dointvec_minmax, | 291 | .proc_handler = proc_dointvec_minmax, |
395 | .strategy = sysctl_intvec, | ||
396 | .extra1 = &min_state_count, | 292 | .extra1 = &min_state_count, |
397 | .extra2 = &max_state_count | 293 | .extra2 = &max_state_count |
398 | }, | 294 | }, |
399 | { | 295 | { |
400 | .ctl_name = NET_DECNET_DR_COUNT, | ||
401 | .procname = "dr_count", | 296 | .procname = "dr_count", |
402 | .data = &decnet_dr_count, | 297 | .data = &decnet_dr_count, |
403 | .maxlen = sizeof(int), | 298 | .maxlen = sizeof(int), |
404 | .mode = 0644, | 299 | .mode = 0644, |
405 | .proc_handler = proc_dointvec_minmax, | 300 | .proc_handler = proc_dointvec_minmax, |
406 | .strategy = sysctl_intvec, | ||
407 | .extra1 = &min_state_count, | 301 | .extra1 = &min_state_count, |
408 | .extra2 = &max_state_count | 302 | .extra2 = &max_state_count |
409 | }, | 303 | }, |
410 | { | 304 | { |
411 | .ctl_name = NET_DECNET_DST_GC_INTERVAL, | ||
412 | .procname = "dst_gc_interval", | 305 | .procname = "dst_gc_interval", |
413 | .data = &decnet_dst_gc_interval, | 306 | .data = &decnet_dst_gc_interval, |
414 | .maxlen = sizeof(int), | 307 | .maxlen = sizeof(int), |
415 | .mode = 0644, | 308 | .mode = 0644, |
416 | .proc_handler = proc_dointvec_minmax, | 309 | .proc_handler = proc_dointvec_minmax, |
417 | .strategy = sysctl_intvec, | ||
418 | .extra1 = &min_decnet_dst_gc_interval, | 310 | .extra1 = &min_decnet_dst_gc_interval, |
419 | .extra2 = &max_decnet_dst_gc_interval | 311 | .extra2 = &max_decnet_dst_gc_interval |
420 | }, | 312 | }, |
421 | { | 313 | { |
422 | .ctl_name = NET_DECNET_NO_FC_MAX_CWND, | ||
423 | .procname = "no_fc_max_cwnd", | 314 | .procname = "no_fc_max_cwnd", |
424 | .data = &decnet_no_fc_max_cwnd, | 315 | .data = &decnet_no_fc_max_cwnd, |
425 | .maxlen = sizeof(int), | 316 | .maxlen = sizeof(int), |
426 | .mode = 0644, | 317 | .mode = 0644, |
427 | .proc_handler = proc_dointvec_minmax, | 318 | .proc_handler = proc_dointvec_minmax, |
428 | .strategy = sysctl_intvec, | ||
429 | .extra1 = &min_decnet_no_fc_max_cwnd, | 319 | .extra1 = &min_decnet_no_fc_max_cwnd, |
430 | .extra2 = &max_decnet_no_fc_max_cwnd | 320 | .extra2 = &max_decnet_no_fc_max_cwnd |
431 | }, | 321 | }, |
432 | { | 322 | { |
433 | .ctl_name = NET_DECNET_MEM, | ||
434 | .procname = "decnet_mem", | 323 | .procname = "decnet_mem", |
435 | .data = &sysctl_decnet_mem, | 324 | .data = &sysctl_decnet_mem, |
436 | .maxlen = sizeof(sysctl_decnet_mem), | 325 | .maxlen = sizeof(sysctl_decnet_mem), |
437 | .mode = 0644, | 326 | .mode = 0644, |
438 | .proc_handler = proc_dointvec, | 327 | .proc_handler = proc_dointvec, |
439 | .strategy = sysctl_intvec, | ||
440 | }, | 328 | }, |
441 | { | 329 | { |
442 | .ctl_name = NET_DECNET_RMEM, | ||
443 | .procname = "decnet_rmem", | 330 | .procname = "decnet_rmem", |
444 | .data = &sysctl_decnet_rmem, | 331 | .data = &sysctl_decnet_rmem, |
445 | .maxlen = sizeof(sysctl_decnet_rmem), | 332 | .maxlen = sizeof(sysctl_decnet_rmem), |
446 | .mode = 0644, | 333 | .mode = 0644, |
447 | .proc_handler = proc_dointvec, | 334 | .proc_handler = proc_dointvec, |
448 | .strategy = sysctl_intvec, | ||
449 | }, | 335 | }, |
450 | { | 336 | { |
451 | .ctl_name = NET_DECNET_WMEM, | ||
452 | .procname = "decnet_wmem", | 337 | .procname = "decnet_wmem", |
453 | .data = &sysctl_decnet_wmem, | 338 | .data = &sysctl_decnet_wmem, |
454 | .maxlen = sizeof(sysctl_decnet_wmem), | 339 | .maxlen = sizeof(sysctl_decnet_wmem), |
455 | .mode = 0644, | 340 | .mode = 0644, |
456 | .proc_handler = proc_dointvec, | 341 | .proc_handler = proc_dointvec, |
457 | .strategy = sysctl_intvec, | ||
458 | }, | 342 | }, |
459 | { | 343 | { |
460 | .ctl_name = NET_DECNET_DEBUG_LEVEL, | ||
461 | .procname = "debug", | 344 | .procname = "debug", |
462 | .data = &decnet_debug_level, | 345 | .data = &decnet_debug_level, |
463 | .maxlen = sizeof(int), | 346 | .maxlen = sizeof(int), |
464 | .mode = 0644, | 347 | .mode = 0644, |
465 | .proc_handler = proc_dointvec, | 348 | .proc_handler = proc_dointvec, |
466 | .strategy = sysctl_intvec, | ||
467 | }, | 349 | }, |
468 | {0} | 350 | { } |
469 | }; | 351 | }; |
470 | 352 | ||
471 | static struct ctl_path dn_path[] = { | 353 | static struct ctl_path dn_path[] = { |
472 | { .procname = "net", .ctl_name = CTL_NET, }, | 354 | { .procname = "net", }, |
473 | { .procname = "decnet", .ctl_name = NET_DECNET, }, | 355 | { .procname = "decnet", }, |
474 | { } | 356 | { } |
475 | }; | 357 | }; |
476 | 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 5df2f6a0b0f0..e049da8311b5 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1293,58 +1293,6 @@ static int devinet_conf_proc(ctl_table *ctl, int write, | |||
1293 | return ret; | 1293 | return ret; |
1294 | } | 1294 | } |
1295 | 1295 | ||
1296 | static int devinet_conf_sysctl(ctl_table *table, | ||
1297 | void __user *oldval, size_t __user *oldlenp, | ||
1298 | void __user *newval, size_t newlen) | ||
1299 | { | ||
1300 | struct ipv4_devconf *cnf; | ||
1301 | struct net *net; | ||
1302 | int *valp = table->data; | ||
1303 | int new; | ||
1304 | int i; | ||
1305 | |||
1306 | if (!newval || !newlen) | ||
1307 | return 0; | ||
1308 | |||
1309 | if (newlen != sizeof(int)) | ||
1310 | return -EINVAL; | ||
1311 | |||
1312 | if (get_user(new, (int __user *)newval)) | ||
1313 | return -EFAULT; | ||
1314 | |||
1315 | if (new == *valp) | ||
1316 | return 0; | ||
1317 | |||
1318 | if (oldval && oldlenp) { | ||
1319 | size_t len; | ||
1320 | |||
1321 | if (get_user(len, oldlenp)) | ||
1322 | return -EFAULT; | ||
1323 | |||
1324 | if (len) { | ||
1325 | if (len > table->maxlen) | ||
1326 | len = table->maxlen; | ||
1327 | if (copy_to_user(oldval, valp, len)) | ||
1328 | return -EFAULT; | ||
1329 | if (put_user(len, oldlenp)) | ||
1330 | return -EFAULT; | ||
1331 | } | ||
1332 | } | ||
1333 | |||
1334 | *valp = new; | ||
1335 | |||
1336 | cnf = table->extra1; | ||
1337 | net = table->extra2; | ||
1338 | i = (int *)table->data - cnf->data; | ||
1339 | |||
1340 | set_bit(i, cnf->state); | ||
1341 | |||
1342 | if (cnf == net->ipv4.devconf_dflt) | ||
1343 | devinet_copy_dflt_conf(net, i); | ||
1344 | |||
1345 | return 1; | ||
1346 | } | ||
1347 | |||
1348 | static int devinet_sysctl_forward(ctl_table *ctl, int write, | 1296 | static int devinet_sysctl_forward(ctl_table *ctl, int write, |
1349 | void __user *buffer, | 1297 | void __user *buffer, |
1350 | size_t *lenp, loff_t *ppos) | 1298 | size_t *lenp, loff_t *ppos) |
@@ -1390,47 +1338,28 @@ int ipv4_doint_and_flush(ctl_table *ctl, int write, | |||
1390 | return ret; | 1338 | return ret; |
1391 | } | 1339 | } |
1392 | 1340 | ||
1393 | int ipv4_doint_and_flush_strategy(ctl_table *table, | 1341 | #define DEVINET_SYSCTL_ENTRY(attr, name, mval, proc) \ |
1394 | void __user *oldval, size_t __user *oldlenp, | ||
1395 | void __user *newval, size_t newlen) | ||
1396 | { | ||
1397 | int ret = devinet_conf_sysctl(table, oldval, oldlenp, newval, newlen); | ||
1398 | struct net *net = table->extra2; | ||
1399 | |||
1400 | if (ret == 1) | ||
1401 | rt_cache_flush(net, 0); | ||
1402 | |||
1403 | return ret; | ||
1404 | } | ||
1405 | |||
1406 | |||
1407 | #define DEVINET_SYSCTL_ENTRY(attr, name, mval, proc, sysctl) \ | ||
1408 | { \ | 1342 | { \ |
1409 | .ctl_name = NET_IPV4_CONF_ ## attr, \ | ||
1410 | .procname = name, \ | 1343 | .procname = name, \ |
1411 | .data = ipv4_devconf.data + \ | 1344 | .data = ipv4_devconf.data + \ |
1412 | NET_IPV4_CONF_ ## attr - 1, \ | 1345 | NET_IPV4_CONF_ ## attr - 1, \ |
1413 | .maxlen = sizeof(int), \ | 1346 | .maxlen = sizeof(int), \ |
1414 | .mode = mval, \ | 1347 | .mode = mval, \ |
1415 | .proc_handler = proc, \ | 1348 | .proc_handler = proc, \ |
1416 | .strategy = sysctl, \ | ||
1417 | .extra1 = &ipv4_devconf, \ | 1349 | .extra1 = &ipv4_devconf, \ |
1418 | } | 1350 | } |
1419 | 1351 | ||
1420 | #define DEVINET_SYSCTL_RW_ENTRY(attr, name) \ | 1352 | #define DEVINET_SYSCTL_RW_ENTRY(attr, name) \ |
1421 | DEVINET_SYSCTL_ENTRY(attr, name, 0644, devinet_conf_proc, \ | 1353 | DEVINET_SYSCTL_ENTRY(attr, name, 0644, devinet_conf_proc) |
1422 | devinet_conf_sysctl) | ||
1423 | 1354 | ||
1424 | #define DEVINET_SYSCTL_RO_ENTRY(attr, name) \ | 1355 | #define DEVINET_SYSCTL_RO_ENTRY(attr, name) \ |
1425 | DEVINET_SYSCTL_ENTRY(attr, name, 0444, devinet_conf_proc, \ | 1356 | DEVINET_SYSCTL_ENTRY(attr, name, 0444, devinet_conf_proc) |
1426 | devinet_conf_sysctl) | ||
1427 | 1357 | ||
1428 | #define DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, proc, sysctl) \ | 1358 | #define DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, proc) \ |
1429 | DEVINET_SYSCTL_ENTRY(attr, name, 0644, proc, sysctl) | 1359 | DEVINET_SYSCTL_ENTRY(attr, name, 0644, proc) |
1430 | 1360 | ||
1431 | #define DEVINET_SYSCTL_FLUSHING_ENTRY(attr, name) \ | 1361 | #define DEVINET_SYSCTL_FLUSHING_ENTRY(attr, name) \ |
1432 | DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, ipv4_doint_and_flush, \ | 1362 | DEVINET_SYSCTL_COMPLEX_ENTRY(attr, name, ipv4_doint_and_flush) |
1433 | ipv4_doint_and_flush_strategy) | ||
1434 | 1363 | ||
1435 | static struct devinet_sysctl_table { | 1364 | static struct devinet_sysctl_table { |
1436 | struct ctl_table_header *sysctl_header; | 1365 | struct ctl_table_header *sysctl_header; |
@@ -1439,8 +1368,7 @@ static struct devinet_sysctl_table { | |||
1439 | } devinet_sysctl = { | 1368 | } devinet_sysctl = { |
1440 | .devinet_vars = { | 1369 | .devinet_vars = { |
1441 | DEVINET_SYSCTL_COMPLEX_ENTRY(FORWARDING, "forwarding", | 1370 | DEVINET_SYSCTL_COMPLEX_ENTRY(FORWARDING, "forwarding", |
1442 | devinet_sysctl_forward, | 1371 | devinet_sysctl_forward), |
1443 | devinet_conf_sysctl), | ||
1444 | DEVINET_SYSCTL_RO_ENTRY(MC_FORWARDING, "mc_forwarding"), | 1372 | DEVINET_SYSCTL_RO_ENTRY(MC_FORWARDING, "mc_forwarding"), |
1445 | 1373 | ||
1446 | DEVINET_SYSCTL_RW_ENTRY(ACCEPT_REDIRECTS, "accept_redirects"), | 1374 | DEVINET_SYSCTL_RW_ENTRY(ACCEPT_REDIRECTS, "accept_redirects"), |
@@ -1471,7 +1399,7 @@ static struct devinet_sysctl_table { | |||
1471 | }; | 1399 | }; |
1472 | 1400 | ||
1473 | static int __devinet_sysctl_register(struct net *net, char *dev_name, | 1401 | static int __devinet_sysctl_register(struct net *net, char *dev_name, |
1474 | int ctl_name, struct ipv4_devconf *p) | 1402 | struct ipv4_devconf *p) |
1475 | { | 1403 | { |
1476 | int i; | 1404 | int i; |
1477 | struct devinet_sysctl_table *t; | 1405 | struct devinet_sysctl_table *t; |
@@ -1479,9 +1407,9 @@ static int __devinet_sysctl_register(struct net *net, char *dev_name, | |||
1479 | #define DEVINET_CTL_PATH_DEV 3 | 1407 | #define DEVINET_CTL_PATH_DEV 3 |
1480 | 1408 | ||
1481 | struct ctl_path devinet_ctl_path[] = { | 1409 | struct ctl_path devinet_ctl_path[] = { |
1482 | { .procname = "net", .ctl_name = CTL_NET, }, | 1410 | { .procname = "net", }, |
1483 | { .procname = "ipv4", .ctl_name = NET_IPV4, }, | 1411 | { .procname = "ipv4", }, |
1484 | { .procname = "conf", .ctl_name = NET_IPV4_CONF, }, | 1412 | { .procname = "conf", }, |
1485 | { /* to be set */ }, | 1413 | { /* to be set */ }, |
1486 | { }, | 1414 | { }, |
1487 | }; | 1415 | }; |
@@ -1506,7 +1434,6 @@ static int __devinet_sysctl_register(struct net *net, char *dev_name, | |||
1506 | goto free; | 1434 | goto free; |
1507 | 1435 | ||
1508 | devinet_ctl_path[DEVINET_CTL_PATH_DEV].procname = t->dev_name; | 1436 | devinet_ctl_path[DEVINET_CTL_PATH_DEV].procname = t->dev_name; |
1509 | devinet_ctl_path[DEVINET_CTL_PATH_DEV].ctl_name = ctl_name; | ||
1510 | 1437 | ||
1511 | t->sysctl_header = register_net_sysctl_table(net, devinet_ctl_path, | 1438 | t->sysctl_header = register_net_sysctl_table(net, devinet_ctl_path, |
1512 | t->devinet_vars); | 1439 | t->devinet_vars); |
@@ -1540,9 +1467,9 @@ static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf) | |||
1540 | static void devinet_sysctl_register(struct in_device *idev) | 1467 | static void devinet_sysctl_register(struct in_device *idev) |
1541 | { | 1468 | { |
1542 | neigh_sysctl_register(idev->dev, idev->arp_parms, NET_IPV4, | 1469 | neigh_sysctl_register(idev->dev, idev->arp_parms, NET_IPV4, |
1543 | NET_IPV4_NEIGH, "ipv4", NULL, NULL); | 1470 | NET_IPV4_NEIGH, "ipv4", NULL); |
1544 | __devinet_sysctl_register(dev_net(idev->dev), idev->dev->name, | 1471 | __devinet_sysctl_register(dev_net(idev->dev), idev->dev->name, |
1545 | idev->dev->ifindex, &idev->cnf); | 1472 | &idev->cnf); |
1546 | } | 1473 | } |
1547 | 1474 | ||
1548 | static void devinet_sysctl_unregister(struct in_device *idev) | 1475 | static void devinet_sysctl_unregister(struct in_device *idev) |
@@ -1553,14 +1480,12 @@ static void devinet_sysctl_unregister(struct in_device *idev) | |||
1553 | 1480 | ||
1554 | static struct ctl_table ctl_forward_entry[] = { | 1481 | static struct ctl_table ctl_forward_entry[] = { |
1555 | { | 1482 | { |
1556 | .ctl_name = NET_IPV4_FORWARD, | ||
1557 | .procname = "ip_forward", | 1483 | .procname = "ip_forward", |
1558 | .data = &ipv4_devconf.data[ | 1484 | .data = &ipv4_devconf.data[ |
1559 | NET_IPV4_CONF_FORWARDING - 1], | 1485 | NET_IPV4_CONF_FORWARDING - 1], |
1560 | .maxlen = sizeof(int), | 1486 | .maxlen = sizeof(int), |
1561 | .mode = 0644, | 1487 | .mode = 0644, |
1562 | .proc_handler = devinet_sysctl_forward, | 1488 | .proc_handler = devinet_sysctl_forward, |
1563 | .strategy = devinet_conf_sysctl, | ||
1564 | .extra1 = &ipv4_devconf, | 1489 | .extra1 = &ipv4_devconf, |
1565 | .extra2 = &init_net, | 1490 | .extra2 = &init_net, |
1566 | }, | 1491 | }, |
@@ -1568,8 +1493,8 @@ static struct ctl_table ctl_forward_entry[] = { | |||
1568 | }; | 1493 | }; |
1569 | 1494 | ||
1570 | static __net_initdata struct ctl_path net_ipv4_path[] = { | 1495 | static __net_initdata struct ctl_path net_ipv4_path[] = { |
1571 | { .procname = "net", .ctl_name = CTL_NET, }, | 1496 | { .procname = "net", }, |
1572 | { .procname = "ipv4", .ctl_name = NET_IPV4, }, | 1497 | { .procname = "ipv4", }, |
1573 | { }, | 1498 | { }, |
1574 | }; | 1499 | }; |
1575 | #endif | 1500 | #endif |
@@ -1608,13 +1533,11 @@ static __net_init int devinet_init_net(struct net *net) | |||
1608 | } | 1533 | } |
1609 | 1534 | ||
1610 | #ifdef CONFIG_SYSCTL | 1535 | #ifdef CONFIG_SYSCTL |
1611 | err = __devinet_sysctl_register(net, "all", | 1536 | err = __devinet_sysctl_register(net, "all", all); |
1612 | NET_PROTO_CONF_ALL, all); | ||
1613 | if (err < 0) | 1537 | if (err < 0) |
1614 | goto err_reg_all; | 1538 | goto err_reg_all; |
1615 | 1539 | ||
1616 | err = __devinet_sysctl_register(net, "default", | 1540 | err = __devinet_sysctl_register(net, "default", dflt); |
1617 | NET_PROTO_CONF_DEFAULT, dflt); | ||
1618 | if (err < 0) | 1541 | if (err < 0) |
1619 | goto err_reg_dflt; | 1542 | goto err_reg_dflt; |
1620 | 1543 | ||
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 575f9bd51ccd..ef24497436fd 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -603,7 +603,6 @@ static int zero; | |||
603 | 603 | ||
604 | static struct ctl_table ip4_frags_ns_ctl_table[] = { | 604 | static struct ctl_table ip4_frags_ns_ctl_table[] = { |
605 | { | 605 | { |
606 | .ctl_name = NET_IPV4_IPFRAG_HIGH_THRESH, | ||
607 | .procname = "ipfrag_high_thresh", | 606 | .procname = "ipfrag_high_thresh", |
608 | .data = &init_net.ipv4.frags.high_thresh, | 607 | .data = &init_net.ipv4.frags.high_thresh, |
609 | .maxlen = sizeof(int), | 608 | .maxlen = sizeof(int), |
@@ -611,7 +610,6 @@ static struct ctl_table ip4_frags_ns_ctl_table[] = { | |||
611 | .proc_handler = proc_dointvec | 610 | .proc_handler = proc_dointvec |
612 | }, | 611 | }, |
613 | { | 612 | { |
614 | .ctl_name = NET_IPV4_IPFRAG_LOW_THRESH, | ||
615 | .procname = "ipfrag_low_thresh", | 613 | .procname = "ipfrag_low_thresh", |
616 | .data = &init_net.ipv4.frags.low_thresh, | 614 | .data = &init_net.ipv4.frags.low_thresh, |
617 | .maxlen = sizeof(int), | 615 | .maxlen = sizeof(int), |
@@ -619,26 +617,22 @@ static struct ctl_table ip4_frags_ns_ctl_table[] = { | |||
619 | .proc_handler = proc_dointvec | 617 | .proc_handler = proc_dointvec |
620 | }, | 618 | }, |
621 | { | 619 | { |
622 | .ctl_name = NET_IPV4_IPFRAG_TIME, | ||
623 | .procname = "ipfrag_time", | 620 | .procname = "ipfrag_time", |
624 | .data = &init_net.ipv4.frags.timeout, | 621 | .data = &init_net.ipv4.frags.timeout, |
625 | .maxlen = sizeof(int), | 622 | .maxlen = sizeof(int), |
626 | .mode = 0644, | 623 | .mode = 0644, |
627 | .proc_handler = proc_dointvec_jiffies, | 624 | .proc_handler = proc_dointvec_jiffies, |
628 | .strategy = sysctl_jiffies | ||
629 | }, | 625 | }, |
630 | { } | 626 | { } |
631 | }; | 627 | }; |
632 | 628 | ||
633 | static struct ctl_table ip4_frags_ctl_table[] = { | 629 | static struct ctl_table ip4_frags_ctl_table[] = { |
634 | { | 630 | { |
635 | .ctl_name = NET_IPV4_IPFRAG_SECRET_INTERVAL, | ||
636 | .procname = "ipfrag_secret_interval", | 631 | .procname = "ipfrag_secret_interval", |
637 | .data = &ip4_frags.secret_interval, | 632 | .data = &ip4_frags.secret_interval, |
638 | .maxlen = sizeof(int), | 633 | .maxlen = sizeof(int), |
639 | .mode = 0644, | 634 | .mode = 0644, |
640 | .proc_handler = proc_dointvec_jiffies, | 635 | .proc_handler = proc_dointvec_jiffies, |
641 | .strategy = sysctl_jiffies | ||
642 | }, | 636 | }, |
643 | { | 637 | { |
644 | .procname = "ipfrag_max_dist", | 638 | .procname = "ipfrag_max_dist", |
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c index 1725dc0ef688..db52c0cb0c11 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 |
250 | struct ctl_path nf_net_ipv4_netfilter_sysctl_path[] = { | 250 | struct 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 | }; |
256 | EXPORT_SYMBOL_GPL(nf_net_ipv4_netfilter_sysctl_path); | 256 | EXPORT_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 c156db215987..c9f90e8c5191 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -516,14 +516,13 @@ static struct ctl_table_header *ipq_sysctl_header; | |||
516 | 516 | ||
517 | static ctl_table ipq_table[] = { | 517 | static ctl_table ipq_table[] = { |
518 | { | 518 | { |
519 | .ctl_name = NET_IPQ_QMAX, | ||
520 | .procname = NET_IPQ_QMAX_NAME, | 519 | .procname = NET_IPQ_QMAX_NAME, |
521 | .data = &queue_maxlen, | 520 | .data = &queue_maxlen, |
522 | .maxlen = sizeof(queue_maxlen), | 521 | .maxlen = sizeof(queue_maxlen), |
523 | .mode = 0644, | 522 | .mode = 0644, |
524 | .proc_handler = proc_dointvec | 523 | .proc_handler = proc_dointvec |
525 | }, | 524 | }, |
526 | { .ctl_name = 0 } | 525 | { } |
527 | }; | 526 | }; |
528 | #endif | 527 | #endif |
529 | 528 | ||
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index aa95bb82ee6c..092d68f916e6 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 | ||
196 | static ctl_table ip_ct_sysctl_table[] = { | 196 | static 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 d71ba7677344..9072058778b8 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 |
278 | static struct ctl_table icmp_compat_sysctl_table[] = { | 276 | static 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 5b1050a5d874..0d9f584a3811 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -3056,23 +3056,6 @@ static int ipv4_sysctl_rtcache_flush(ctl_table *__ctl, int write, | |||
3056 | return -EINVAL; | 3056 | return -EINVAL; |
3057 | } | 3057 | } |
3058 | 3058 | ||
3059 | static int ipv4_sysctl_rtcache_flush_strategy(ctl_table *table, | ||
3060 | void __user *oldval, | ||
3061 | size_t __user *oldlenp, | ||
3062 | void __user *newval, | ||
3063 | size_t newlen) | ||
3064 | { | ||
3065 | int delay; | ||
3066 | struct net *net; | ||
3067 | if (newlen != sizeof(int)) | ||
3068 | return -EINVAL; | ||
3069 | if (get_user(delay, (int __user *)newval)) | ||
3070 | return -EFAULT; | ||
3071 | net = (struct net *)table->extra1; | ||
3072 | rt_cache_flush(net, delay); | ||
3073 | return 0; | ||
3074 | } | ||
3075 | |||
3076 | static void rt_secret_reschedule(int old) | 3059 | static void rt_secret_reschedule(int old) |
3077 | { | 3060 | { |
3078 | struct net *net; | 3061 | struct net *net; |
@@ -3117,23 +3100,8 @@ static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write, | |||
3117 | return ret; | 3100 | return ret; |
3118 | } | 3101 | } |
3119 | 3102 | ||
3120 | static int ipv4_sysctl_rt_secret_interval_strategy(ctl_table *table, | ||
3121 | void __user *oldval, | ||
3122 | size_t __user *oldlenp, | ||
3123 | void __user *newval, | ||
3124 | size_t newlen) | ||
3125 | { | ||
3126 | int old = ip_rt_secret_interval; | ||
3127 | int ret = sysctl_jiffies(table, oldval, oldlenp, newval, newlen); | ||
3128 | |||
3129 | rt_secret_reschedule(old); | ||
3130 | |||
3131 | return ret; | ||
3132 | } | ||
3133 | |||
3134 | static ctl_table ipv4_route_table[] = { | 3103 | static ctl_table ipv4_route_table[] = { |
3135 | { | 3104 | { |
3136 | .ctl_name = NET_IPV4_ROUTE_GC_THRESH, | ||
3137 | .procname = "gc_thresh", | 3105 | .procname = "gc_thresh", |
3138 | .data = &ipv4_dst_ops.gc_thresh, | 3106 | .data = &ipv4_dst_ops.gc_thresh, |
3139 | .maxlen = sizeof(int), | 3107 | .maxlen = sizeof(int), |
@@ -3141,7 +3109,6 @@ static ctl_table ipv4_route_table[] = { | |||
3141 | .proc_handler = proc_dointvec, | 3109 | .proc_handler = proc_dointvec, |
3142 | }, | 3110 | }, |
3143 | { | 3111 | { |
3144 | .ctl_name = NET_IPV4_ROUTE_MAX_SIZE, | ||
3145 | .procname = "max_size", | 3112 | .procname = "max_size", |
3146 | .data = &ip_rt_max_size, | 3113 | .data = &ip_rt_max_size, |
3147 | .maxlen = sizeof(int), | 3114 | .maxlen = sizeof(int), |
@@ -3151,43 +3118,34 @@ static ctl_table ipv4_route_table[] = { | |||
3151 | { | 3118 | { |
3152 | /* Deprecated. Use gc_min_interval_ms */ | 3119 | /* Deprecated. Use gc_min_interval_ms */ |
3153 | 3120 | ||
3154 | .ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL, | ||
3155 | .procname = "gc_min_interval", | 3121 | .procname = "gc_min_interval", |
3156 | .data = &ip_rt_gc_min_interval, | 3122 | .data = &ip_rt_gc_min_interval, |
3157 | .maxlen = sizeof(int), | 3123 | .maxlen = sizeof(int), |
3158 | .mode = 0644, | 3124 | .mode = 0644, |
3159 | .proc_handler = proc_dointvec_jiffies, | 3125 | .proc_handler = proc_dointvec_jiffies, |
3160 | .strategy = sysctl_jiffies, | ||
3161 | }, | 3126 | }, |
3162 | { | 3127 | { |
3163 | .ctl_name = NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS, | ||
3164 | .procname = "gc_min_interval_ms", | 3128 | .procname = "gc_min_interval_ms", |
3165 | .data = &ip_rt_gc_min_interval, | 3129 | .data = &ip_rt_gc_min_interval, |
3166 | .maxlen = sizeof(int), | 3130 | .maxlen = sizeof(int), |
3167 | .mode = 0644, | 3131 | .mode = 0644, |
3168 | .proc_handler = proc_dointvec_ms_jiffies, | 3132 | .proc_handler = proc_dointvec_ms_jiffies, |
3169 | .strategy = sysctl_ms_jiffies, | ||
3170 | }, | 3133 | }, |
3171 | { | 3134 | { |
3172 | .ctl_name = NET_IPV4_ROUTE_GC_TIMEOUT, | ||
3173 | .procname = "gc_timeout", | 3135 | .procname = "gc_timeout", |
3174 | .data = &ip_rt_gc_timeout, | 3136 | .data = &ip_rt_gc_timeout, |
3175 | .maxlen = sizeof(int), | 3137 | .maxlen = sizeof(int), |
3176 | .mode = 0644, | 3138 | .mode = 0644, |
3177 | .proc_handler = proc_dointvec_jiffies, | 3139 | .proc_handler = proc_dointvec_jiffies, |
3178 | .strategy = sysctl_jiffies, | ||
3179 | }, | 3140 | }, |
3180 | { | 3141 | { |
3181 | .ctl_name = NET_IPV4_ROUTE_GC_INTERVAL, | ||
3182 | .procname = "gc_interval", | 3142 | .procname = "gc_interval", |
3183 | .data = &ip_rt_gc_interval, | 3143 | .data = &ip_rt_gc_interval, |
3184 | .maxlen = sizeof(int), | 3144 | .maxlen = sizeof(int), |
3185 | .mode = 0644, | 3145 | .mode = 0644, |
3186 | .proc_handler = proc_dointvec_jiffies, | 3146 | .proc_handler = proc_dointvec_jiffies, |
3187 | .strategy = sysctl_jiffies, | ||
3188 | }, | 3147 | }, |
3189 | { | 3148 | { |
3190 | .ctl_name = NET_IPV4_ROUTE_REDIRECT_LOAD, | ||
3191 | .procname = "redirect_load", | 3149 | .procname = "redirect_load", |
3192 | .data = &ip_rt_redirect_load, | 3150 | .data = &ip_rt_redirect_load, |
3193 | .maxlen = sizeof(int), | 3151 | .maxlen = sizeof(int), |
@@ -3195,7 +3153,6 @@ static ctl_table ipv4_route_table[] = { | |||
3195 | .proc_handler = proc_dointvec, | 3153 | .proc_handler = proc_dointvec, |
3196 | }, | 3154 | }, |
3197 | { | 3155 | { |
3198 | .ctl_name = NET_IPV4_ROUTE_REDIRECT_NUMBER, | ||
3199 | .procname = "redirect_number", | 3156 | .procname = "redirect_number", |
3200 | .data = &ip_rt_redirect_number, | 3157 | .data = &ip_rt_redirect_number, |
3201 | .maxlen = sizeof(int), | 3158 | .maxlen = sizeof(int), |
@@ -3203,7 +3160,6 @@ static ctl_table ipv4_route_table[] = { | |||
3203 | .proc_handler = proc_dointvec, | 3160 | .proc_handler = proc_dointvec, |
3204 | }, | 3161 | }, |
3205 | { | 3162 | { |
3206 | .ctl_name = NET_IPV4_ROUTE_REDIRECT_SILENCE, | ||
3207 | .procname = "redirect_silence", | 3163 | .procname = "redirect_silence", |
3208 | .data = &ip_rt_redirect_silence, | 3164 | .data = &ip_rt_redirect_silence, |
3209 | .maxlen = sizeof(int), | 3165 | .maxlen = sizeof(int), |
@@ -3211,7 +3167,6 @@ static ctl_table ipv4_route_table[] = { | |||
3211 | .proc_handler = proc_dointvec, | 3167 | .proc_handler = proc_dointvec, |
3212 | }, | 3168 | }, |
3213 | { | 3169 | { |
3214 | .ctl_name = NET_IPV4_ROUTE_ERROR_COST, | ||
3215 | .procname = "error_cost", | 3170 | .procname = "error_cost", |
3216 | .data = &ip_rt_error_cost, | 3171 | .data = &ip_rt_error_cost, |
3217 | .maxlen = sizeof(int), | 3172 | .maxlen = sizeof(int), |
@@ -3219,7 +3174,6 @@ static ctl_table ipv4_route_table[] = { | |||
3219 | .proc_handler = proc_dointvec, | 3174 | .proc_handler = proc_dointvec, |
3220 | }, | 3175 | }, |
3221 | { | 3176 | { |
3222 | .ctl_name = NET_IPV4_ROUTE_ERROR_BURST, | ||
3223 | .procname = "error_burst", | 3177 | .procname = "error_burst", |
3224 | .data = &ip_rt_error_burst, | 3178 | .data = &ip_rt_error_burst, |
3225 | .maxlen = sizeof(int), | 3179 | .maxlen = sizeof(int), |
@@ -3227,7 +3181,6 @@ static ctl_table ipv4_route_table[] = { | |||
3227 | .proc_handler = proc_dointvec, | 3181 | .proc_handler = proc_dointvec, |
3228 | }, | 3182 | }, |
3229 | { | 3183 | { |
3230 | .ctl_name = NET_IPV4_ROUTE_GC_ELASTICITY, | ||
3231 | .procname = "gc_elasticity", | 3184 | .procname = "gc_elasticity", |
3232 | .data = &ip_rt_gc_elasticity, | 3185 | .data = &ip_rt_gc_elasticity, |
3233 | .maxlen = sizeof(int), | 3186 | .maxlen = sizeof(int), |
@@ -3235,16 +3188,13 @@ static ctl_table ipv4_route_table[] = { | |||
3235 | .proc_handler = proc_dointvec, | 3188 | .proc_handler = proc_dointvec, |
3236 | }, | 3189 | }, |
3237 | { | 3190 | { |
3238 | .ctl_name = NET_IPV4_ROUTE_MTU_EXPIRES, | ||
3239 | .procname = "mtu_expires", | 3191 | .procname = "mtu_expires", |
3240 | .data = &ip_rt_mtu_expires, | 3192 | .data = &ip_rt_mtu_expires, |
3241 | .maxlen = sizeof(int), | 3193 | .maxlen = sizeof(int), |
3242 | .mode = 0644, | 3194 | .mode = 0644, |
3243 | .proc_handler = proc_dointvec_jiffies, | 3195 | .proc_handler = proc_dointvec_jiffies, |
3244 | .strategy = sysctl_jiffies, | ||
3245 | }, | 3196 | }, |
3246 | { | 3197 | { |
3247 | .ctl_name = NET_IPV4_ROUTE_MIN_PMTU, | ||
3248 | .procname = "min_pmtu", | 3198 | .procname = "min_pmtu", |
3249 | .data = &ip_rt_min_pmtu, | 3199 | .data = &ip_rt_min_pmtu, |
3250 | .maxlen = sizeof(int), | 3200 | .maxlen = sizeof(int), |
@@ -3252,7 +3202,6 @@ static ctl_table ipv4_route_table[] = { | |||
3252 | .proc_handler = proc_dointvec, | 3202 | .proc_handler = proc_dointvec, |
3253 | }, | 3203 | }, |
3254 | { | 3204 | { |
3255 | .ctl_name = NET_IPV4_ROUTE_MIN_ADVMSS, | ||
3256 | .procname = "min_adv_mss", | 3205 | .procname = "min_adv_mss", |
3257 | .data = &ip_rt_min_advmss, | 3206 | .data = &ip_rt_min_advmss, |
3258 | .maxlen = sizeof(int), | 3207 | .maxlen = sizeof(int), |
@@ -3260,50 +3209,46 @@ static ctl_table ipv4_route_table[] = { | |||
3260 | .proc_handler = proc_dointvec, | 3209 | .proc_handler = proc_dointvec, |
3261 | }, | 3210 | }, |
3262 | { | 3211 | { |
3263 | .ctl_name = NET_IPV4_ROUTE_SECRET_INTERVAL, | ||
3264 | .procname = "secret_interval", | 3212 | .procname = "secret_interval", |
3265 | .data = &ip_rt_secret_interval, | 3213 | .data = &ip_rt_secret_interval, |
3266 | .maxlen = sizeof(int), | 3214 | .maxlen = sizeof(int), |
3267 | .mode = 0644, | 3215 | .mode = 0644, |
3268 | .proc_handler = ipv4_sysctl_rt_secret_interval, | 3216 | .proc_handler = ipv4_sysctl_rt_secret_interval, |
3269 | .strategy = ipv4_sysctl_rt_secret_interval_strategy, | ||
3270 | }, | 3217 | }, |
3271 | { .ctl_name = 0 } | 3218 | { } |
3272 | }; | 3219 | }; |
3273 | 3220 | ||
3274 | static struct ctl_table empty[1]; | 3221 | static struct ctl_table empty[1]; |
3275 | 3222 | ||
3276 | static struct ctl_table ipv4_skeleton[] = | 3223 | static struct ctl_table ipv4_skeleton[] = |
3277 | { | 3224 | { |
3278 | { .procname = "route", .ctl_name = NET_IPV4_ROUTE, | 3225 | { .procname = "route", |
3279 | .mode = 0555, .child = ipv4_route_table}, | 3226 | .mode = 0555, .child = ipv4_route_table}, |
3280 | { .procname = "neigh", .ctl_name = NET_IPV4_NEIGH, | 3227 | { .procname = "neigh", |
3281 | .mode = 0555, .child = empty}, | 3228 | .mode = 0555, .child = empty}, |
3282 | { } | 3229 | { } |
3283 | }; | 3230 | }; |
3284 | 3231 | ||
3285 | static __net_initdata struct ctl_path ipv4_path[] = { | 3232 | static __net_initdata struct ctl_path ipv4_path[] = { |
3286 | { .procname = "net", .ctl_name = CTL_NET, }, | 3233 | { .procname = "net", }, |
3287 | { .procname = "ipv4", .ctl_name = NET_IPV4, }, | 3234 | { .procname = "ipv4", }, |
3288 | { }, | 3235 | { }, |
3289 | }; | 3236 | }; |
3290 | 3237 | ||
3291 | static struct ctl_table ipv4_route_flush_table[] = { | 3238 | static struct ctl_table ipv4_route_flush_table[] = { |
3292 | { | 3239 | { |
3293 | .ctl_name = NET_IPV4_ROUTE_FLUSH, | ||
3294 | .procname = "flush", | 3240 | .procname = "flush", |
3295 | .maxlen = sizeof(int), | 3241 | .maxlen = sizeof(int), |
3296 | .mode = 0200, | 3242 | .mode = 0200, |
3297 | .proc_handler = ipv4_sysctl_rtcache_flush, | 3243 | .proc_handler = ipv4_sysctl_rtcache_flush, |
3298 | .strategy = ipv4_sysctl_rtcache_flush_strategy, | ||
3299 | }, | 3244 | }, |
3300 | { .ctl_name = 0 }, | 3245 | { }, |
3301 | }; | 3246 | }; |
3302 | 3247 | ||
3303 | static __net_initdata struct ctl_path ipv4_route_path[] = { | 3248 | static __net_initdata struct ctl_path ipv4_route_path[] = { |
3304 | { .procname = "net", .ctl_name = CTL_NET, }, | 3249 | { .procname = "net", }, |
3305 | { .procname = "ipv4", .ctl_name = NET_IPV4, }, | 3250 | { .procname = "ipv4", }, |
3306 | { .procname = "route", .ctl_name = NET_IPV4_ROUTE, }, | 3251 | { .procname = "route", }, |
3307 | { }, | 3252 | { }, |
3308 | }; | 3253 | }; |
3309 | 3254 | ||
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 2dcf04d9b005..300056732953 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. */ | ||
67 | static 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 | |||
94 | static int proc_tcp_congestion_control(ctl_table *ctl, int write, | 66 | static 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 | ||
112 | static 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 | |||
131 | static int proc_tcp_available_congestion_control(ctl_table *ctl, | 84 | static 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 | ||
168 | static 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 | |||
191 | static struct ctl_table ipv4_table[] = { | 121 | static 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,41 +569,34 @@ 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 = "udp_mem", | 572 | .procname = "udp_mem", |
718 | .data = &sysctl_udp_mem, | 573 | .data = &sysctl_udp_mem, |
719 | .maxlen = sizeof(sysctl_udp_mem), | 574 | .maxlen = sizeof(sysctl_udp_mem), |
720 | .mode = 0644, | 575 | .mode = 0644, |
721 | .proc_handler = proc_dointvec_minmax, | 576 | .proc_handler = proc_dointvec_minmax, |
722 | .strategy = sysctl_intvec, | ||
723 | .extra1 = &zero | 577 | .extra1 = &zero |
724 | }, | 578 | }, |
725 | { | 579 | { |
726 | .ctl_name = CTL_UNNUMBERED, | ||
727 | .procname = "udp_rmem_min", | 580 | .procname = "udp_rmem_min", |
728 | .data = &sysctl_udp_rmem_min, | 581 | .data = &sysctl_udp_rmem_min, |
729 | .maxlen = sizeof(sysctl_udp_rmem_min), | 582 | .maxlen = sizeof(sysctl_udp_rmem_min), |
730 | .mode = 0644, | 583 | .mode = 0644, |
731 | .proc_handler = proc_dointvec_minmax, | 584 | .proc_handler = proc_dointvec_minmax, |
732 | .strategy = sysctl_intvec, | ||
733 | .extra1 = &zero | 585 | .extra1 = &zero |
734 | }, | 586 | }, |
735 | { | 587 | { |
736 | .ctl_name = CTL_UNNUMBERED, | ||
737 | .procname = "udp_wmem_min", | 588 | .procname = "udp_wmem_min", |
738 | .data = &sysctl_udp_wmem_min, | 589 | .data = &sysctl_udp_wmem_min, |
739 | .maxlen = sizeof(sysctl_udp_wmem_min), | 590 | .maxlen = sizeof(sysctl_udp_wmem_min), |
740 | .mode = 0644, | 591 | .mode = 0644, |
741 | .proc_handler = proc_dointvec_minmax, | 592 | .proc_handler = proc_dointvec_minmax, |
742 | .strategy = sysctl_intvec, | ||
743 | .extra1 = &zero | 593 | .extra1 = &zero |
744 | }, | 594 | }, |
745 | { .ctl_name = 0 } | 595 | { } |
746 | }; | 596 | }; |
747 | 597 | ||
748 | static struct ctl_table ipv4_net_table[] = { | 598 | static struct ctl_table ipv4_net_table[] = { |
749 | { | 599 | { |
750 | .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_ALL, | ||
751 | .procname = "icmp_echo_ignore_all", | 600 | .procname = "icmp_echo_ignore_all", |
752 | .data = &init_net.ipv4.sysctl_icmp_echo_ignore_all, | 601 | .data = &init_net.ipv4.sysctl_icmp_echo_ignore_all, |
753 | .maxlen = sizeof(int), | 602 | .maxlen = sizeof(int), |
@@ -755,7 +604,6 @@ static struct ctl_table ipv4_net_table[] = { | |||
755 | .proc_handler = proc_dointvec | 604 | .proc_handler = proc_dointvec |
756 | }, | 605 | }, |
757 | { | 606 | { |
758 | .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, | ||
759 | .procname = "icmp_echo_ignore_broadcasts", | 607 | .procname = "icmp_echo_ignore_broadcasts", |
760 | .data = &init_net.ipv4.sysctl_icmp_echo_ignore_broadcasts, | 608 | .data = &init_net.ipv4.sysctl_icmp_echo_ignore_broadcasts, |
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_IGNORE_BOGUS_ERROR_RESPONSES, | ||
767 | .procname = "icmp_ignore_bogus_error_responses", | 614 | .procname = "icmp_ignore_bogus_error_responses", |
768 | .data = &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses, | 615 | .data = &init_net.ipv4.sysctl_icmp_ignore_bogus_error_responses, |
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_ERRORS_USE_INBOUND_IFADDR, | ||
775 | .procname = "icmp_errors_use_inbound_ifaddr", | 621 | .procname = "icmp_errors_use_inbound_ifaddr", |
776 | .data = &init_net.ipv4.sysctl_icmp_errors_use_inbound_ifaddr, | 622 | .data = &init_net.ipv4.sysctl_icmp_errors_use_inbound_ifaddr, |
777 | .maxlen = sizeof(int), | 623 | .maxlen = sizeof(int), |
@@ -779,16 +625,13 @@ 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_RATELIMIT, | ||
783 | .procname = "icmp_ratelimit", | 628 | .procname = "icmp_ratelimit", |
784 | .data = &init_net.ipv4.sysctl_icmp_ratelimit, | 629 | .data = &init_net.ipv4.sysctl_icmp_ratelimit, |
785 | .maxlen = sizeof(int), | 630 | .maxlen = sizeof(int), |
786 | .mode = 0644, | 631 | .mode = 0644, |
787 | .proc_handler = proc_dointvec_ms_jiffies, | 632 | .proc_handler = proc_dointvec_ms_jiffies, |
788 | .strategy = sysctl_ms_jiffies | ||
789 | }, | 633 | }, |
790 | { | 634 | { |
791 | .ctl_name = NET_IPV4_ICMP_RATEMASK, | ||
792 | .procname = "icmp_ratemask", | 635 | .procname = "icmp_ratemask", |
793 | .data = &init_net.ipv4.sysctl_icmp_ratemask, | 636 | .data = &init_net.ipv4.sysctl_icmp_ratemask, |
794 | .maxlen = sizeof(int), | 637 | .maxlen = sizeof(int), |
@@ -796,7 +639,6 @@ static struct ctl_table ipv4_net_table[] = { | |||
796 | .proc_handler = proc_dointvec | 639 | .proc_handler = proc_dointvec |
797 | }, | 640 | }, |
798 | { | 641 | { |
799 | .ctl_name = CTL_UNNUMBERED, | ||
800 | .procname = "rt_cache_rebuild_count", | 642 | .procname = "rt_cache_rebuild_count", |
801 | .data = &init_net.ipv4.sysctl_rt_cache_rebuild_count, | 643 | .data = &init_net.ipv4.sysctl_rt_cache_rebuild_count, |
802 | .maxlen = sizeof(int), | 644 | .maxlen = sizeof(int), |
@@ -807,8 +649,8 @@ static struct ctl_table ipv4_net_table[] = { | |||
807 | }; | 649 | }; |
808 | 650 | ||
809 | struct ctl_path net_ipv4_ctl_path[] = { | 651 | struct ctl_path net_ipv4_ctl_path[] = { |
810 | { .procname = "net", .ctl_name = CTL_NET, }, | 652 | { .procname = "net", }, |
811 | { .procname = "ipv4", .ctl_name = NET_IPV4, }, | 653 | { .procname = "ipv4", }, |
812 | { }, | 654 | { }, |
813 | }; | 655 | }; |
814 | EXPORT_SYMBOL_GPL(net_ipv4_ctl_path); | 656 | EXPORT_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 |
268 | static struct ctl_table xfrm4_policy_table[] = { | 268 | static 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 1fd0a3d775d2..f918399c985c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -4000,41 +4000,6 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write, | |||
4000 | return ret; | 4000 | return ret; |
4001 | } | 4001 | } |
4002 | 4002 | ||
4003 | static int addrconf_sysctl_forward_strategy(ctl_table *table, | ||
4004 | void __user *oldval, | ||
4005 | size_t __user *oldlenp, | ||
4006 | void __user *newval, size_t newlen) | ||
4007 | { | ||
4008 | int *valp = table->data; | ||
4009 | int val = *valp; | ||
4010 | int new; | ||
4011 | |||
4012 | if (!newval || !newlen) | ||
4013 | return 0; | ||
4014 | if (newlen != sizeof(int)) | ||
4015 | return -EINVAL; | ||
4016 | if (get_user(new, (int __user *)newval)) | ||
4017 | return -EFAULT; | ||
4018 | if (new == *valp) | ||
4019 | return 0; | ||
4020 | if (oldval && oldlenp) { | ||
4021 | size_t len; | ||
4022 | if (get_user(len, oldlenp)) | ||
4023 | return -EFAULT; | ||
4024 | if (len) { | ||
4025 | if (len > table->maxlen) | ||
4026 | len = table->maxlen; | ||
4027 | if (copy_to_user(oldval, valp, len)) | ||
4028 | return -EFAULT; | ||
4029 | if (put_user(len, oldlenp)) | ||
4030 | return -EFAULT; | ||
4031 | } | ||
4032 | } | ||
4033 | |||
4034 | *valp = new; | ||
4035 | return addrconf_fixup_forwarding(table, valp, val); | ||
4036 | } | ||
4037 | |||
4038 | static void dev_disable_change(struct inet6_dev *idev) | 4003 | static void dev_disable_change(struct inet6_dev *idev) |
4039 | { | 4004 | { |
4040 | if (!idev || !idev->dev) | 4005 | if (!idev || !idev->dev) |
@@ -4113,16 +4078,13 @@ static struct addrconf_sysctl_table | |||
4113 | .sysctl_header = NULL, | 4078 | .sysctl_header = NULL, |
4114 | .addrconf_vars = { | 4079 | .addrconf_vars = { |
4115 | { | 4080 | { |
4116 | .ctl_name = NET_IPV6_FORWARDING, | ||
4117 | .procname = "forwarding", | 4081 | .procname = "forwarding", |
4118 | .data = &ipv6_devconf.forwarding, | 4082 | .data = &ipv6_devconf.forwarding, |
4119 | .maxlen = sizeof(int), | 4083 | .maxlen = sizeof(int), |
4120 | .mode = 0644, | 4084 | .mode = 0644, |
4121 | .proc_handler = addrconf_sysctl_forward, | 4085 | .proc_handler = addrconf_sysctl_forward, |
4122 | .strategy = addrconf_sysctl_forward_strategy, | ||
4123 | }, | 4086 | }, |
4124 | { | 4087 | { |
4125 | .ctl_name = NET_IPV6_HOP_LIMIT, | ||
4126 | .procname = "hop_limit", | 4088 | .procname = "hop_limit", |
4127 | .data = &ipv6_devconf.hop_limit, | 4089 | .data = &ipv6_devconf.hop_limit, |
4128 | .maxlen = sizeof(int), | 4090 | .maxlen = sizeof(int), |
@@ -4130,7 +4092,6 @@ static struct addrconf_sysctl_table | |||
4130 | .proc_handler = proc_dointvec, | 4092 | .proc_handler = proc_dointvec, |
4131 | }, | 4093 | }, |
4132 | { | 4094 | { |
4133 | .ctl_name = NET_IPV6_MTU, | ||
4134 | .procname = "mtu", | 4095 | .procname = "mtu", |
4135 | .data = &ipv6_devconf.mtu6, | 4096 | .data = &ipv6_devconf.mtu6, |
4136 | .maxlen = sizeof(int), | 4097 | .maxlen = sizeof(int), |
@@ -4138,7 +4099,6 @@ static struct addrconf_sysctl_table | |||
4138 | .proc_handler = proc_dointvec, | 4099 | .proc_handler = proc_dointvec, |
4139 | }, | 4100 | }, |
4140 | { | 4101 | { |
4141 | .ctl_name = NET_IPV6_ACCEPT_RA, | ||
4142 | .procname = "accept_ra", | 4102 | .procname = "accept_ra", |
4143 | .data = &ipv6_devconf.accept_ra, | 4103 | .data = &ipv6_devconf.accept_ra, |
4144 | .maxlen = sizeof(int), | 4104 | .maxlen = sizeof(int), |
@@ -4146,7 +4106,6 @@ static struct addrconf_sysctl_table | |||
4146 | .proc_handler = proc_dointvec, | 4106 | .proc_handler = proc_dointvec, |
4147 | }, | 4107 | }, |
4148 | { | 4108 | { |
4149 | .ctl_name = NET_IPV6_ACCEPT_REDIRECTS, | ||
4150 | .procname = "accept_redirects", | 4109 | .procname = "accept_redirects", |
4151 | .data = &ipv6_devconf.accept_redirects, | 4110 | .data = &ipv6_devconf.accept_redirects, |
4152 | .maxlen = sizeof(int), | 4111 | .maxlen = sizeof(int), |
@@ -4154,7 +4113,6 @@ static struct addrconf_sysctl_table | |||
4154 | .proc_handler = proc_dointvec, | 4113 | .proc_handler = proc_dointvec, |
4155 | }, | 4114 | }, |
4156 | { | 4115 | { |
4157 | .ctl_name = NET_IPV6_AUTOCONF, | ||
4158 | .procname = "autoconf", | 4116 | .procname = "autoconf", |
4159 | .data = &ipv6_devconf.autoconf, | 4117 | .data = &ipv6_devconf.autoconf, |
4160 | .maxlen = sizeof(int), | 4118 | .maxlen = sizeof(int), |
@@ -4162,7 +4120,6 @@ static struct addrconf_sysctl_table | |||
4162 | .proc_handler = proc_dointvec, | 4120 | .proc_handler = proc_dointvec, |
4163 | }, | 4121 | }, |
4164 | { | 4122 | { |
4165 | .ctl_name = NET_IPV6_DAD_TRANSMITS, | ||
4166 | .procname = "dad_transmits", | 4123 | .procname = "dad_transmits", |
4167 | .data = &ipv6_devconf.dad_transmits, | 4124 | .data = &ipv6_devconf.dad_transmits, |
4168 | .maxlen = sizeof(int), | 4125 | .maxlen = sizeof(int), |
@@ -4170,7 +4127,6 @@ static struct addrconf_sysctl_table | |||
4170 | .proc_handler = proc_dointvec, | 4127 | .proc_handler = proc_dointvec, |
4171 | }, | 4128 | }, |
4172 | { | 4129 | { |
4173 | .ctl_name = NET_IPV6_RTR_SOLICITS, | ||
4174 | .procname = "router_solicitations", | 4130 | .procname = "router_solicitations", |
4175 | .data = &ipv6_devconf.rtr_solicits, | 4131 | .data = &ipv6_devconf.rtr_solicits, |
4176 | .maxlen = sizeof(int), | 4132 | .maxlen = sizeof(int), |
@@ -4178,25 +4134,20 @@ static struct addrconf_sysctl_table | |||
4178 | .proc_handler = proc_dointvec, | 4134 | .proc_handler = proc_dointvec, |
4179 | }, | 4135 | }, |
4180 | { | 4136 | { |
4181 | .ctl_name = NET_IPV6_RTR_SOLICIT_INTERVAL, | ||
4182 | .procname = "router_solicitation_interval", | 4137 | .procname = "router_solicitation_interval", |
4183 | .data = &ipv6_devconf.rtr_solicit_interval, | 4138 | .data = &ipv6_devconf.rtr_solicit_interval, |
4184 | .maxlen = sizeof(int), | 4139 | .maxlen = sizeof(int), |
4185 | .mode = 0644, | 4140 | .mode = 0644, |
4186 | .proc_handler = proc_dointvec_jiffies, | 4141 | .proc_handler = proc_dointvec_jiffies, |
4187 | .strategy = sysctl_jiffies, | ||
4188 | }, | 4142 | }, |
4189 | { | 4143 | { |
4190 | .ctl_name = NET_IPV6_RTR_SOLICIT_DELAY, | ||
4191 | .procname = "router_solicitation_delay", | 4144 | .procname = "router_solicitation_delay", |
4192 | .data = &ipv6_devconf.rtr_solicit_delay, | 4145 | .data = &ipv6_devconf.rtr_solicit_delay, |
4193 | .maxlen = sizeof(int), | 4146 | .maxlen = sizeof(int), |
4194 | .mode = 0644, | 4147 | .mode = 0644, |
4195 | .proc_handler = proc_dointvec_jiffies, | 4148 | .proc_handler = proc_dointvec_jiffies, |
4196 | .strategy = sysctl_jiffies, | ||
4197 | }, | 4149 | }, |
4198 | { | 4150 | { |
4199 | .ctl_name = NET_IPV6_FORCE_MLD_VERSION, | ||
4200 | .procname = "force_mld_version", | 4151 | .procname = "force_mld_version", |
4201 | .data = &ipv6_devconf.force_mld_version, | 4152 | .data = &ipv6_devconf.force_mld_version, |
4202 | .maxlen = sizeof(int), | 4153 | .maxlen = sizeof(int), |
@@ -4205,7 +4156,6 @@ static struct addrconf_sysctl_table | |||
4205 | }, | 4156 | }, |
4206 | #ifdef CONFIG_IPV6_PRIVACY | 4157 | #ifdef CONFIG_IPV6_PRIVACY |
4207 | { | 4158 | { |
4208 | .ctl_name = NET_IPV6_USE_TEMPADDR, | ||
4209 | .procname = "use_tempaddr", | 4159 | .procname = "use_tempaddr", |
4210 | .data = &ipv6_devconf.use_tempaddr, | 4160 | .data = &ipv6_devconf.use_tempaddr, |
4211 | .maxlen = sizeof(int), | 4161 | .maxlen = sizeof(int), |
@@ -4213,7 +4163,6 @@ static struct addrconf_sysctl_table | |||
4213 | .proc_handler = proc_dointvec, | 4163 | .proc_handler = proc_dointvec, |
4214 | }, | 4164 | }, |
4215 | { | 4165 | { |
4216 | .ctl_name = NET_IPV6_TEMP_VALID_LFT, | ||
4217 | .procname = "temp_valid_lft", | 4166 | .procname = "temp_valid_lft", |
4218 | .data = &ipv6_devconf.temp_valid_lft, | 4167 | .data = &ipv6_devconf.temp_valid_lft, |
4219 | .maxlen = sizeof(int), | 4168 | .maxlen = sizeof(int), |
@@ -4221,7 +4170,6 @@ static struct addrconf_sysctl_table | |||
4221 | .proc_handler = proc_dointvec, | 4170 | .proc_handler = proc_dointvec, |
4222 | }, | 4171 | }, |
4223 | { | 4172 | { |
4224 | .ctl_name = NET_IPV6_TEMP_PREFERED_LFT, | ||
4225 | .procname = "temp_prefered_lft", | 4173 | .procname = "temp_prefered_lft", |
4226 | .data = &ipv6_devconf.temp_prefered_lft, | 4174 | .data = &ipv6_devconf.temp_prefered_lft, |
4227 | .maxlen = sizeof(int), | 4175 | .maxlen = sizeof(int), |
@@ -4229,7 +4177,6 @@ static struct addrconf_sysctl_table | |||
4229 | .proc_handler = proc_dointvec, | 4177 | .proc_handler = proc_dointvec, |
4230 | }, | 4178 | }, |
4231 | { | 4179 | { |
4232 | .ctl_name = NET_IPV6_REGEN_MAX_RETRY, | ||
4233 | .procname = "regen_max_retry", | 4180 | .procname = "regen_max_retry", |
4234 | .data = &ipv6_devconf.regen_max_retry, | 4181 | .data = &ipv6_devconf.regen_max_retry, |
4235 | .maxlen = sizeof(int), | 4182 | .maxlen = sizeof(int), |
@@ -4237,7 +4184,6 @@ static struct addrconf_sysctl_table | |||
4237 | .proc_handler = proc_dointvec, | 4184 | .proc_handler = proc_dointvec, |
4238 | }, | 4185 | }, |
4239 | { | 4186 | { |
4240 | .ctl_name = NET_IPV6_MAX_DESYNC_FACTOR, | ||
4241 | .procname = "max_desync_factor", | 4187 | .procname = "max_desync_factor", |
4242 | .data = &ipv6_devconf.max_desync_factor, | 4188 | .data = &ipv6_devconf.max_desync_factor, |
4243 | .maxlen = sizeof(int), | 4189 | .maxlen = sizeof(int), |
@@ -4246,7 +4192,6 @@ static struct addrconf_sysctl_table | |||
4246 | }, | 4192 | }, |
4247 | #endif | 4193 | #endif |
4248 | { | 4194 | { |
4249 | .ctl_name = NET_IPV6_MAX_ADDRESSES, | ||
4250 | .procname = "max_addresses", | 4195 | .procname = "max_addresses", |
4251 | .data = &ipv6_devconf.max_addresses, | 4196 | .data = &ipv6_devconf.max_addresses, |
4252 | .maxlen = sizeof(int), | 4197 | .maxlen = sizeof(int), |
@@ -4254,7 +4199,6 @@ static struct addrconf_sysctl_table | |||
4254 | .proc_handler = proc_dointvec, | 4199 | .proc_handler = proc_dointvec, |
4255 | }, | 4200 | }, |
4256 | { | 4201 | { |
4257 | .ctl_name = NET_IPV6_ACCEPT_RA_DEFRTR, | ||
4258 | .procname = "accept_ra_defrtr", | 4202 | .procname = "accept_ra_defrtr", |
4259 | .data = &ipv6_devconf.accept_ra_defrtr, | 4203 | .data = &ipv6_devconf.accept_ra_defrtr, |
4260 | .maxlen = sizeof(int), | 4204 | .maxlen = sizeof(int), |
@@ -4262,7 +4206,6 @@ static struct addrconf_sysctl_table | |||
4262 | .proc_handler = proc_dointvec, | 4206 | .proc_handler = proc_dointvec, |
4263 | }, | 4207 | }, |
4264 | { | 4208 | { |
4265 | .ctl_name = NET_IPV6_ACCEPT_RA_PINFO, | ||
4266 | .procname = "accept_ra_pinfo", | 4209 | .procname = "accept_ra_pinfo", |
4267 | .data = &ipv6_devconf.accept_ra_pinfo, | 4210 | .data = &ipv6_devconf.accept_ra_pinfo, |
4268 | .maxlen = sizeof(int), | 4211 | .maxlen = sizeof(int), |
@@ -4271,7 +4214,6 @@ static struct addrconf_sysctl_table | |||
4271 | }, | 4214 | }, |
4272 | #ifdef CONFIG_IPV6_ROUTER_PREF | 4215 | #ifdef CONFIG_IPV6_ROUTER_PREF |
4273 | { | 4216 | { |
4274 | .ctl_name = NET_IPV6_ACCEPT_RA_RTR_PREF, | ||
4275 | .procname = "accept_ra_rtr_pref", | 4217 | .procname = "accept_ra_rtr_pref", |
4276 | .data = &ipv6_devconf.accept_ra_rtr_pref, | 4218 | .data = &ipv6_devconf.accept_ra_rtr_pref, |
4277 | .maxlen = sizeof(int), | 4219 | .maxlen = sizeof(int), |
@@ -4279,17 +4221,14 @@ static struct addrconf_sysctl_table | |||
4279 | .proc_handler = proc_dointvec, | 4221 | .proc_handler = proc_dointvec, |
4280 | }, | 4222 | }, |
4281 | { | 4223 | { |
4282 | .ctl_name = NET_IPV6_RTR_PROBE_INTERVAL, | ||
4283 | .procname = "router_probe_interval", | 4224 | .procname = "router_probe_interval", |
4284 | .data = &ipv6_devconf.rtr_probe_interval, | 4225 | .data = &ipv6_devconf.rtr_probe_interval, |
4285 | .maxlen = sizeof(int), | 4226 | .maxlen = sizeof(int), |
4286 | .mode = 0644, | 4227 | .mode = 0644, |
4287 | .proc_handler = proc_dointvec_jiffies, | 4228 | .proc_handler = proc_dointvec_jiffies, |
4288 | .strategy = sysctl_jiffies, | ||
4289 | }, | 4229 | }, |
4290 | #ifdef CONFIG_IPV6_ROUTE_INFO | 4230 | #ifdef CONFIG_IPV6_ROUTE_INFO |
4291 | { | 4231 | { |
4292 | .ctl_name = NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN, | ||
4293 | .procname = "accept_ra_rt_info_max_plen", | 4232 | .procname = "accept_ra_rt_info_max_plen", |
4294 | .data = &ipv6_devconf.accept_ra_rt_info_max_plen, | 4233 | .data = &ipv6_devconf.accept_ra_rt_info_max_plen, |
4295 | .maxlen = sizeof(int), | 4234 | .maxlen = sizeof(int), |
@@ -4299,7 +4238,6 @@ static struct addrconf_sysctl_table | |||
4299 | #endif | 4238 | #endif |
4300 | #endif | 4239 | #endif |
4301 | { | 4240 | { |
4302 | .ctl_name = NET_IPV6_PROXY_NDP, | ||
4303 | .procname = "proxy_ndp", | 4241 | .procname = "proxy_ndp", |
4304 | .data = &ipv6_devconf.proxy_ndp, | 4242 | .data = &ipv6_devconf.proxy_ndp, |
4305 | .maxlen = sizeof(int), | 4243 | .maxlen = sizeof(int), |
@@ -4307,7 +4245,6 @@ static struct addrconf_sysctl_table | |||
4307 | .proc_handler = proc_dointvec, | 4245 | .proc_handler = proc_dointvec, |
4308 | }, | 4246 | }, |
4309 | { | 4247 | { |
4310 | .ctl_name = NET_IPV6_ACCEPT_SOURCE_ROUTE, | ||
4311 | .procname = "accept_source_route", | 4248 | .procname = "accept_source_route", |
4312 | .data = &ipv6_devconf.accept_source_route, | 4249 | .data = &ipv6_devconf.accept_source_route, |
4313 | .maxlen = sizeof(int), | 4250 | .maxlen = sizeof(int), |
@@ -4316,7 +4253,6 @@ static struct addrconf_sysctl_table | |||
4316 | }, | 4253 | }, |
4317 | #ifdef CONFIG_IPV6_OPTIMISTIC_DAD | 4254 | #ifdef CONFIG_IPV6_OPTIMISTIC_DAD |
4318 | { | 4255 | { |
4319 | .ctl_name = CTL_UNNUMBERED, | ||
4320 | .procname = "optimistic_dad", | 4256 | .procname = "optimistic_dad", |
4321 | .data = &ipv6_devconf.optimistic_dad, | 4257 | .data = &ipv6_devconf.optimistic_dad, |
4322 | .maxlen = sizeof(int), | 4258 | .maxlen = sizeof(int), |
@@ -4327,7 +4263,6 @@ static struct addrconf_sysctl_table | |||
4327 | #endif | 4263 | #endif |
4328 | #ifdef CONFIG_IPV6_MROUTE | 4264 | #ifdef CONFIG_IPV6_MROUTE |
4329 | { | 4265 | { |
4330 | .ctl_name = CTL_UNNUMBERED, | ||
4331 | .procname = "mc_forwarding", | 4266 | .procname = "mc_forwarding", |
4332 | .data = &ipv6_devconf.mc_forwarding, | 4267 | .data = &ipv6_devconf.mc_forwarding, |
4333 | .maxlen = sizeof(int), | 4268 | .maxlen = sizeof(int), |
@@ -4336,16 +4271,13 @@ static struct addrconf_sysctl_table | |||
4336 | }, | 4271 | }, |
4337 | #endif | 4272 | #endif |
4338 | { | 4273 | { |
4339 | .ctl_name = CTL_UNNUMBERED, | ||
4340 | .procname = "disable_ipv6", | 4274 | .procname = "disable_ipv6", |
4341 | .data = &ipv6_devconf.disable_ipv6, | 4275 | .data = &ipv6_devconf.disable_ipv6, |
4342 | .maxlen = sizeof(int), | 4276 | .maxlen = sizeof(int), |
4343 | .mode = 0644, | 4277 | .mode = 0644, |
4344 | .proc_handler = addrconf_sysctl_disable, | 4278 | .proc_handler = addrconf_sysctl_disable, |
4345 | .strategy = sysctl_intvec, | ||
4346 | }, | 4279 | }, |
4347 | { | 4280 | { |
4348 | .ctl_name = CTL_UNNUMBERED, | ||
4349 | .procname = "accept_dad", | 4281 | .procname = "accept_dad", |
4350 | .data = &ipv6_devconf.accept_dad, | 4282 | .data = &ipv6_devconf.accept_dad, |
4351 | .maxlen = sizeof(int), | 4283 | .maxlen = sizeof(int), |
@@ -4353,13 +4285,13 @@ static struct addrconf_sysctl_table | |||
4353 | .proc_handler = proc_dointvec, | 4285 | .proc_handler = proc_dointvec, |
4354 | }, | 4286 | }, |
4355 | { | 4287 | { |
4356 | .ctl_name = 0, /* sentinel */ | 4288 | /* sentinel */ |
4357 | } | 4289 | } |
4358 | }, | 4290 | }, |
4359 | }; | 4291 | }; |
4360 | 4292 | ||
4361 | static int __addrconf_sysctl_register(struct net *net, char *dev_name, | 4293 | static int __addrconf_sysctl_register(struct net *net, char *dev_name, |
4362 | int ctl_name, struct inet6_dev *idev, struct ipv6_devconf *p) | 4294 | struct inet6_dev *idev, struct ipv6_devconf *p) |
4363 | { | 4295 | { |
4364 | int i; | 4296 | int i; |
4365 | struct addrconf_sysctl_table *t; | 4297 | struct addrconf_sysctl_table *t; |
@@ -4367,9 +4299,9 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name, | |||
4367 | #define ADDRCONF_CTL_PATH_DEV 3 | 4299 | #define ADDRCONF_CTL_PATH_DEV 3 |
4368 | 4300 | ||
4369 | struct ctl_path addrconf_ctl_path[] = { | 4301 | struct ctl_path addrconf_ctl_path[] = { |
4370 | { .procname = "net", .ctl_name = CTL_NET, }, | 4302 | { .procname = "net", }, |
4371 | { .procname = "ipv6", .ctl_name = NET_IPV6, }, | 4303 | { .procname = "ipv6", }, |
4372 | { .procname = "conf", .ctl_name = NET_IPV6_CONF, }, | 4304 | { .procname = "conf", }, |
4373 | { /* to be set */ }, | 4305 | { /* to be set */ }, |
4374 | { }, | 4306 | { }, |
4375 | }; | 4307 | }; |
@@ -4395,7 +4327,6 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name, | |||
4395 | goto free; | 4327 | goto free; |
4396 | 4328 | ||
4397 | addrconf_ctl_path[ADDRCONF_CTL_PATH_DEV].procname = t->dev_name; | 4329 | addrconf_ctl_path[ADDRCONF_CTL_PATH_DEV].procname = t->dev_name; |
4398 | addrconf_ctl_path[ADDRCONF_CTL_PATH_DEV].ctl_name = ctl_name; | ||
4399 | 4330 | ||
4400 | t->sysctl_header = register_net_sysctl_table(net, addrconf_ctl_path, | 4331 | t->sysctl_header = register_net_sysctl_table(net, addrconf_ctl_path, |
4401 | t->addrconf_vars); | 4332 | t->addrconf_vars); |
@@ -4431,10 +4362,9 @@ static void addrconf_sysctl_register(struct inet6_dev *idev) | |||
4431 | { | 4362 | { |
4432 | neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, | 4363 | neigh_sysctl_register(idev->dev, idev->nd_parms, NET_IPV6, |
4433 | NET_IPV6_NEIGH, "ipv6", | 4364 | NET_IPV6_NEIGH, "ipv6", |
4434 | &ndisc_ifinfo_sysctl_change, | 4365 | &ndisc_ifinfo_sysctl_change); |
4435 | ndisc_ifinfo_sysctl_strategy); | ||
4436 | __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, | 4366 | __addrconf_sysctl_register(dev_net(idev->dev), idev->dev->name, |
4437 | idev->dev->ifindex, idev, &idev->cnf); | 4367 | idev, &idev->cnf); |
4438 | } | 4368 | } |
4439 | 4369 | ||
4440 | static void addrconf_sysctl_unregister(struct inet6_dev *idev) | 4370 | static void addrconf_sysctl_unregister(struct inet6_dev *idev) |
@@ -4473,13 +4403,11 @@ static int addrconf_init_net(struct net *net) | |||
4473 | net->ipv6.devconf_dflt = dflt; | 4403 | net->ipv6.devconf_dflt = dflt; |
4474 | 4404 | ||
4475 | #ifdef CONFIG_SYSCTL | 4405 | #ifdef CONFIG_SYSCTL |
4476 | err = __addrconf_sysctl_register(net, "all", NET_PROTO_CONF_ALL, | 4406 | err = __addrconf_sysctl_register(net, "all", NULL, all); |
4477 | NULL, all); | ||
4478 | if (err < 0) | 4407 | if (err < 0) |
4479 | goto err_reg_all; | 4408 | goto err_reg_all; |
4480 | 4409 | ||
4481 | err = __addrconf_sysctl_register(net, "default", NET_PROTO_CONF_DEFAULT, | 4410 | err = __addrconf_sysctl_register(net, "default", NULL, dflt); |
4482 | NULL, dflt); | ||
4483 | if (err < 0) | 4411 | if (err < 0) |
4484 | goto err_reg_dflt; | 4412 | goto err_reg_dflt; |
4485 | #endif | 4413 | #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 |
943 | ctl_table ipv6_icmp_table_template[] = { | 943 | ctl_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 | ||
956 | struct ctl_table *ipv6_icmp_sysctl_init(struct net *net) | 954 | struct ctl_table *ipv6_icmp_sysctl_init(struct net *net) |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index f74e4e2cdd06..3d0520e455d8 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1768,42 +1768,6 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void __user *bu | |||
1768 | return ret; | 1768 | return ret; |
1769 | } | 1769 | } |
1770 | 1770 | ||
1771 | int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, | ||
1772 | void __user *oldval, size_t __user *oldlenp, | ||
1773 | void __user *newval, size_t newlen) | ||
1774 | { | ||
1775 | struct net_device *dev = ctl->extra1; | ||
1776 | struct inet6_dev *idev; | ||
1777 | int ret; | ||
1778 | |||
1779 | if (ctl->ctl_name == NET_NEIGH_RETRANS_TIME || | ||
1780 | ctl->ctl_name == NET_NEIGH_REACHABLE_TIME) | ||
1781 | ndisc_warn_deprecated_sysctl(ctl, "procfs", dev ? dev->name : "default"); | ||
1782 | |||
1783 | switch (ctl->ctl_name) { | ||
1784 | case NET_NEIGH_REACHABLE_TIME: | ||
1785 | ret = sysctl_jiffies(ctl, oldval, oldlenp, newval, newlen); | ||
1786 | break; | ||
1787 | case NET_NEIGH_RETRANS_TIME_MS: | ||
1788 | case NET_NEIGH_REACHABLE_TIME_MS: | ||
1789 | ret = sysctl_ms_jiffies(ctl, oldval, oldlenp, newval, newlen); | ||
1790 | break; | ||
1791 | default: | ||
1792 | ret = 0; | ||
1793 | } | ||
1794 | |||
1795 | if (newval && newlen && ret > 0 && | ||
1796 | dev && (idev = in6_dev_get(dev)) != NULL) { | ||
1797 | if (ctl->ctl_name == NET_NEIGH_REACHABLE_TIME || | ||
1798 | ctl->ctl_name == NET_NEIGH_REACHABLE_TIME_MS) | ||
1799 | idev->nd_parms->reachable_time = neigh_rand_reach_time(idev->nd_parms->base_reachable_time); | ||
1800 | idev->tstamp = jiffies; | ||
1801 | inet6_ifinfo_notify(RTM_NEWLINK, idev); | ||
1802 | in6_dev_put(idev); | ||
1803 | } | ||
1804 | |||
1805 | return ret; | ||
1806 | } | ||
1807 | 1771 | ||
1808 | #endif | 1772 | #endif |
1809 | 1773 | ||
@@ -1857,8 +1821,7 @@ int __init ndisc_init(void) | |||
1857 | #ifdef CONFIG_SYSCTL | 1821 | #ifdef CONFIG_SYSCTL |
1858 | err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, | 1822 | err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, |
1859 | NET_IPV6_NEIGH, "ipv6", | 1823 | NET_IPV6_NEIGH, "ipv6", |
1860 | &ndisc_ifinfo_sysctl_change, | 1824 | &ndisc_ifinfo_sysctl_change); |
1861 | &ndisc_ifinfo_sysctl_strategy); | ||
1862 | if (err) | 1825 | if (err) |
1863 | goto out_unregister_pernet; | 1826 | goto out_unregister_pernet; |
1864 | #endif | 1827 | #endif |
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index 1cf3f0c6a959..14e52aa624c2 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 | ||
42 | typedef int (*ipq_cmpfn)(struct nf_queue_entry *, unsigned long); | 41 | typedef int (*ipq_cmpfn)(struct nf_queue_entry *, unsigned long); |
@@ -518,14 +517,13 @@ static struct ctl_table_header *ipq_sysctl_header; | |||
518 | 517 | ||
519 | static ctl_table ipq_table[] = { | 518 | static ctl_table ipq_table[] = { |
520 | { | 519 | { |
521 | .ctl_name = NET_IPQ_QMAX, | ||
522 | .procname = NET_IPQ_QMAX_NAME, | 520 | .procname = NET_IPQ_QMAX_NAME, |
523 | .data = &queue_maxlen, | 521 | .data = &queue_maxlen, |
524 | .maxlen = sizeof(queue_maxlen), | 522 | .maxlen = sizeof(queue_maxlen), |
525 | .mode = 0644, | 523 | .mode = 0644, |
526 | .proc_handler = proc_dointvec | 524 | .proc_handler = proc_dointvec |
527 | }, | 525 | }, |
528 | { .ctl_name = 0 } | 526 | { } |
529 | }; | 527 | }; |
530 | #endif | 528 | #endif |
531 | 529 | ||
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index 642dcb127bab..2acadc8c7883 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 da5bd0ed83df..2499e9712031 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -636,7 +636,6 @@ static const struct inet6_protocol frag_protocol = | |||
636 | #ifdef CONFIG_SYSCTL | 636 | #ifdef CONFIG_SYSCTL |
637 | static struct ctl_table ip6_frags_ns_ctl_table[] = { | 637 | static struct ctl_table ip6_frags_ns_ctl_table[] = { |
638 | { | 638 | { |
639 | .ctl_name = NET_IPV6_IP6FRAG_HIGH_THRESH, | ||
640 | .procname = "ip6frag_high_thresh", | 639 | .procname = "ip6frag_high_thresh", |
641 | .data = &init_net.ipv6.frags.high_thresh, | 640 | .data = &init_net.ipv6.frags.high_thresh, |
642 | .maxlen = sizeof(int), | 641 | .maxlen = sizeof(int), |
@@ -644,7 +643,6 @@ static struct ctl_table ip6_frags_ns_ctl_table[] = { | |||
644 | .proc_handler = proc_dointvec | 643 | .proc_handler = proc_dointvec |
645 | }, | 644 | }, |
646 | { | 645 | { |
647 | .ctl_name = NET_IPV6_IP6FRAG_LOW_THRESH, | ||
648 | .procname = "ip6frag_low_thresh", | 646 | .procname = "ip6frag_low_thresh", |
649 | .data = &init_net.ipv6.frags.low_thresh, | 647 | .data = &init_net.ipv6.frags.low_thresh, |
650 | .maxlen = sizeof(int), | 648 | .maxlen = sizeof(int), |
@@ -652,26 +650,22 @@ static struct ctl_table ip6_frags_ns_ctl_table[] = { | |||
652 | .proc_handler = proc_dointvec | 650 | .proc_handler = proc_dointvec |
653 | }, | 651 | }, |
654 | { | 652 | { |
655 | .ctl_name = NET_IPV6_IP6FRAG_TIME, | ||
656 | .procname = "ip6frag_time", | 653 | .procname = "ip6frag_time", |
657 | .data = &init_net.ipv6.frags.timeout, | 654 | .data = &init_net.ipv6.frags.timeout, |
658 | .maxlen = sizeof(int), | 655 | .maxlen = sizeof(int), |
659 | .mode = 0644, | 656 | .mode = 0644, |
660 | .proc_handler = proc_dointvec_jiffies, | 657 | .proc_handler = proc_dointvec_jiffies, |
661 | .strategy = sysctl_jiffies, | ||
662 | }, | 658 | }, |
663 | { } | 659 | { } |
664 | }; | 660 | }; |
665 | 661 | ||
666 | static struct ctl_table ip6_frags_ctl_table[] = { | 662 | static struct ctl_table ip6_frags_ctl_table[] = { |
667 | { | 663 | { |
668 | .ctl_name = NET_IPV6_IP6FRAG_SECRET_INTERVAL, | ||
669 | .procname = "ip6frag_secret_interval", | 664 | .procname = "ip6frag_secret_interval", |
670 | .data = &ip6_frags.secret_interval, | 665 | .data = &ip6_frags.secret_interval, |
671 | .maxlen = sizeof(int), | 666 | .maxlen = sizeof(int), |
672 | .mode = 0644, | 667 | .mode = 0644, |
673 | .proc_handler = proc_dointvec_jiffies, | 668 | .proc_handler = proc_dointvec_jiffies, |
674 | .strategy = sysctl_jiffies | ||
675 | }, | 669 | }, |
676 | { } | 670 | { } |
677 | }; | 671 | }; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d6fe7646a8ff..6aa202e26f97 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2546,7 +2546,6 @@ ctl_table ipv6_route_table_template[] = { | |||
2546 | .proc_handler = ipv6_sysctl_rtcache_flush | 2546 | .proc_handler = ipv6_sysctl_rtcache_flush |
2547 | }, | 2547 | }, |
2548 | { | 2548 | { |
2549 | .ctl_name = NET_IPV6_ROUTE_GC_THRESH, | ||
2550 | .procname = "gc_thresh", | 2549 | .procname = "gc_thresh", |
2551 | .data = &ip6_dst_ops_template.gc_thresh, | 2550 | .data = &ip6_dst_ops_template.gc_thresh, |
2552 | .maxlen = sizeof(int), | 2551 | .maxlen = sizeof(int), |
@@ -2554,7 +2553,6 @@ ctl_table ipv6_route_table_template[] = { | |||
2554 | .proc_handler = proc_dointvec, | 2553 | .proc_handler = proc_dointvec, |
2555 | }, | 2554 | }, |
2556 | { | 2555 | { |
2557 | .ctl_name = NET_IPV6_ROUTE_MAX_SIZE, | ||
2558 | .procname = "max_size", | 2556 | .procname = "max_size", |
2559 | .data = &init_net.ipv6.sysctl.ip6_rt_max_size, | 2557 | .data = &init_net.ipv6.sysctl.ip6_rt_max_size, |
2560 | .maxlen = sizeof(int), | 2558 | .maxlen = sizeof(int), |
@@ -2562,69 +2560,55 @@ ctl_table ipv6_route_table_template[] = { | |||
2562 | .proc_handler = proc_dointvec, | 2560 | .proc_handler = proc_dointvec, |
2563 | }, | 2561 | }, |
2564 | { | 2562 | { |
2565 | .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL, | ||
2566 | .procname = "gc_min_interval", | 2563 | .procname = "gc_min_interval", |
2567 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval, | 2564 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval, |
2568 | .maxlen = sizeof(int), | 2565 | .maxlen = sizeof(int), |
2569 | .mode = 0644, | 2566 | .mode = 0644, |
2570 | .proc_handler = proc_dointvec_jiffies, | 2567 | .proc_handler = proc_dointvec_jiffies, |
2571 | .strategy = sysctl_jiffies, | ||
2572 | }, | 2568 | }, |
2573 | { | 2569 | { |
2574 | .ctl_name = NET_IPV6_ROUTE_GC_TIMEOUT, | ||
2575 | .procname = "gc_timeout", | 2570 | .procname = "gc_timeout", |
2576 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_timeout, | 2571 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_timeout, |
2577 | .maxlen = sizeof(int), | 2572 | .maxlen = sizeof(int), |
2578 | .mode = 0644, | 2573 | .mode = 0644, |
2579 | .proc_handler = proc_dointvec_jiffies, | 2574 | .proc_handler = proc_dointvec_jiffies, |
2580 | .strategy = sysctl_jiffies, | ||
2581 | }, | 2575 | }, |
2582 | { | 2576 | { |
2583 | .ctl_name = NET_IPV6_ROUTE_GC_INTERVAL, | ||
2584 | .procname = "gc_interval", | 2577 | .procname = "gc_interval", |
2585 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_interval, | 2578 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_interval, |
2586 | .maxlen = sizeof(int), | 2579 | .maxlen = sizeof(int), |
2587 | .mode = 0644, | 2580 | .mode = 0644, |
2588 | .proc_handler = proc_dointvec_jiffies, | 2581 | .proc_handler = proc_dointvec_jiffies, |
2589 | .strategy = sysctl_jiffies, | ||
2590 | }, | 2582 | }, |
2591 | { | 2583 | { |
2592 | .ctl_name = NET_IPV6_ROUTE_GC_ELASTICITY, | ||
2593 | .procname = "gc_elasticity", | 2584 | .procname = "gc_elasticity", |
2594 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_elasticity, | 2585 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_elasticity, |
2595 | .maxlen = sizeof(int), | 2586 | .maxlen = sizeof(int), |
2596 | .mode = 0644, | 2587 | .mode = 0644, |
2597 | .proc_handler = proc_dointvec_jiffies, | 2588 | .proc_handler = proc_dointvec_jiffies, |
2598 | .strategy = sysctl_jiffies, | ||
2599 | }, | 2589 | }, |
2600 | { | 2590 | { |
2601 | .ctl_name = NET_IPV6_ROUTE_MTU_EXPIRES, | ||
2602 | .procname = "mtu_expires", | 2591 | .procname = "mtu_expires", |
2603 | .data = &init_net.ipv6.sysctl.ip6_rt_mtu_expires, | 2592 | .data = &init_net.ipv6.sysctl.ip6_rt_mtu_expires, |
2604 | .maxlen = sizeof(int), | 2593 | .maxlen = sizeof(int), |
2605 | .mode = 0644, | 2594 | .mode = 0644, |
2606 | .proc_handler = proc_dointvec_jiffies, | 2595 | .proc_handler = proc_dointvec_jiffies, |
2607 | .strategy = sysctl_jiffies, | ||
2608 | }, | 2596 | }, |
2609 | { | 2597 | { |
2610 | .ctl_name = NET_IPV6_ROUTE_MIN_ADVMSS, | ||
2611 | .procname = "min_adv_mss", | 2598 | .procname = "min_adv_mss", |
2612 | .data = &init_net.ipv6.sysctl.ip6_rt_min_advmss, | 2599 | .data = &init_net.ipv6.sysctl.ip6_rt_min_advmss, |
2613 | .maxlen = sizeof(int), | 2600 | .maxlen = sizeof(int), |
2614 | .mode = 0644, | 2601 | .mode = 0644, |
2615 | .proc_handler = proc_dointvec_jiffies, | 2602 | .proc_handler = proc_dointvec_jiffies, |
2616 | .strategy = sysctl_jiffies, | ||
2617 | }, | 2603 | }, |
2618 | { | 2604 | { |
2619 | .ctl_name = NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS, | ||
2620 | .procname = "gc_min_interval_ms", | 2605 | .procname = "gc_min_interval_ms", |
2621 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval, | 2606 | .data = &init_net.ipv6.sysctl.ip6_rt_gc_min_interval, |
2622 | .maxlen = sizeof(int), | 2607 | .maxlen = sizeof(int), |
2623 | .mode = 0644, | 2608 | .mode = 0644, |
2624 | .proc_handler = proc_dointvec_ms_jiffies, | 2609 | .proc_handler = proc_dointvec_ms_jiffies, |
2625 | .strategy = sysctl_ms_jiffies, | ||
2626 | }, | 2610 | }, |
2627 | { .ctl_name = 0 } | 2611 | { } |
2628 | }; | 2612 | }; |
2629 | 2613 | ||
2630 | struct ctl_table *ipv6_route_sysctl_init(struct net *net) | 2614 | struct 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 | ||
17 | static ctl_table ipv6_table_template[] = { | 17 | static 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 | ||
43 | static ctl_table ipv6_rotable[] = { | 40 | static 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 | ||
55 | struct ctl_path net_ipv6_ctl_path[] = { | 51 | struct 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 | }; |
60 | EXPORT_SYMBOL_GPL(net_ipv6_ctl_path); | 56 | EXPORT_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 |
310 | static struct ctl_table xfrm6_policy_table[] = { | 310 | static 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 | ||
19 | static struct ctl_table ipx_table[] = { | 19 | static 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 | ||
31 | static struct ctl_path ipx_path[] = { | 30 | static 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 */ |
114 | static ctl_table irda_table[] = { | 114 | static 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 | ||
263 | static struct ctl_path irda_path[] = { | 238 | static 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 | ||
16 | static struct ctl_table llc2_timeout_table[] = { | 16 | static 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 | ||
56 | static struct ctl_table llc_station_table[] = { | 48 | static 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 | ||
69 | static struct ctl_table llc2_dir_timeout_table[] = { | 59 | static 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 | ||
79 | static struct ctl_table llc_table[] = { | 68 | static 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 | ||
95 | static struct ctl_path llc_path[] = { | 82 | static 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 |
275 | struct ctl_path nf_net_netfilter_sysctl_path[] = { | 275 | struct 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 | }; |
280 | EXPORT_SYMBOL_GPL(nf_net_netfilter_sysctl_path); | 280 | EXPORT_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 | ||
1712 | const struct ctl_path net_vs_ctl_path[] = { | 1712 | const 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 | ||
127 | static struct ctl_table_header * sysctl_header; | 127 | static 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 | ||
308 | static struct ctl_table_header * sysctl_header; | 308 | static 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 |
31 | static struct ctl_table acct_sysctl_table[] = { | 31 | static 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 |
152 | static struct ctl_table event_sysctl_table[] = { | 152 | static 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 1b816a2ea813..7bf1395b4158 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 */ |
704 | static struct ctl_table dccp_sysctl_table[] = { | 704 | static 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 |
77 | static struct ctl_table generic_compat_sysctl_table[] = { | 75 | static 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 97a82ba75376..f86284662756 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c | |||
@@ -1303,7 +1303,6 @@ static struct ctl_table tcp_sysctl_table[] = { | |||
1303 | .proc_handler = proc_dointvec_jiffies, | 1303 | .proc_handler = proc_dointvec_jiffies, |
1304 | }, | 1304 | }, |
1305 | { | 1305 | { |
1306 | .ctl_name = NET_NF_CONNTRACK_TCP_LOOSE, | ||
1307 | .procname = "nf_conntrack_tcp_loose", | 1306 | .procname = "nf_conntrack_tcp_loose", |
1308 | .data = &nf_ct_tcp_loose, | 1307 | .data = &nf_ct_tcp_loose, |
1309 | .maxlen = sizeof(unsigned int), | 1308 | .maxlen = sizeof(unsigned int), |
@@ -1311,7 +1310,6 @@ static struct ctl_table tcp_sysctl_table[] = { | |||
1311 | .proc_handler = proc_dointvec, | 1310 | .proc_handler = proc_dointvec, |
1312 | }, | 1311 | }, |
1313 | { | 1312 | { |
1314 | .ctl_name = NET_NF_CONNTRACK_TCP_BE_LIBERAL, | ||
1315 | .procname = "nf_conntrack_tcp_be_liberal", | 1313 | .procname = "nf_conntrack_tcp_be_liberal", |
1316 | .data = &nf_ct_tcp_be_liberal, | 1314 | .data = &nf_ct_tcp_be_liberal, |
1317 | .maxlen = sizeof(unsigned int), | 1315 | .maxlen = sizeof(unsigned int), |
@@ -1319,16 +1317,13 @@ static struct ctl_table tcp_sysctl_table[] = { | |||
1319 | .proc_handler = proc_dointvec, | 1317 | .proc_handler = proc_dointvec, |
1320 | }, | 1318 | }, |
1321 | { | 1319 | { |
1322 | .ctl_name = NET_NF_CONNTRACK_TCP_MAX_RETRANS, | ||
1323 | .procname = "nf_conntrack_tcp_max_retrans", | 1320 | .procname = "nf_conntrack_tcp_max_retrans", |
1324 | .data = &nf_ct_tcp_max_retrans, | 1321 | .data = &nf_ct_tcp_max_retrans, |
1325 | .maxlen = sizeof(unsigned int), | 1322 | .maxlen = sizeof(unsigned int), |
1326 | .mode = 0644, | 1323 | .mode = 0644, |
1327 | .proc_handler = proc_dointvec, | 1324 | .proc_handler = proc_dointvec, |
1328 | }, | 1325 | }, |
1329 | { | 1326 | { } |
1330 | .ctl_name = 0 | ||
1331 | } | ||
1332 | }; | 1327 | }; |
1333 | 1328 | ||
1334 | #ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT | 1329 | #ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT |
@@ -1404,7 +1399,6 @@ static struct ctl_table tcp_compat_sysctl_table[] = { | |||
1404 | .proc_handler = proc_dointvec_jiffies, | 1399 | .proc_handler = proc_dointvec_jiffies, |
1405 | }, | 1400 | }, |
1406 | { | 1401 | { |
1407 | .ctl_name = NET_IPV4_NF_CONNTRACK_TCP_LOOSE, | ||
1408 | .procname = "ip_conntrack_tcp_loose", | 1402 | .procname = "ip_conntrack_tcp_loose", |
1409 | .data = &nf_ct_tcp_loose, | 1403 | .data = &nf_ct_tcp_loose, |
1410 | .maxlen = sizeof(unsigned int), | 1404 | .maxlen = sizeof(unsigned int), |
@@ -1412,7 +1406,6 @@ static struct ctl_table tcp_compat_sysctl_table[] = { | |||
1412 | .proc_handler = proc_dointvec, | 1406 | .proc_handler = proc_dointvec, |
1413 | }, | 1407 | }, |
1414 | { | 1408 | { |
1415 | .ctl_name = NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL, | ||
1416 | .procname = "ip_conntrack_tcp_be_liberal", | 1409 | .procname = "ip_conntrack_tcp_be_liberal", |
1417 | .data = &nf_ct_tcp_be_liberal, | 1410 | .data = &nf_ct_tcp_be_liberal, |
1418 | .maxlen = sizeof(unsigned int), | 1411 | .maxlen = sizeof(unsigned int), |
@@ -1420,16 +1413,13 @@ static struct ctl_table tcp_compat_sysctl_table[] = { | |||
1420 | .proc_handler = proc_dointvec, | 1413 | .proc_handler = proc_dointvec, |
1421 | }, | 1414 | }, |
1422 | { | 1415 | { |
1423 | .ctl_name = NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS, | ||
1424 | .procname = "ip_conntrack_tcp_max_retrans", | 1416 | .procname = "ip_conntrack_tcp_max_retrans", |
1425 | .data = &nf_ct_tcp_max_retrans, | 1417 | .data = &nf_ct_tcp_max_retrans, |
1426 | .maxlen = sizeof(unsigned int), | 1418 | .maxlen = sizeof(unsigned int), |
1427 | .mode = 0644, | 1419 | .mode = 0644, |
1428 | .proc_handler = proc_dointvec, | 1420 | .proc_handler = proc_dointvec, |
1429 | }, | 1421 | }, |
1430 | { | 1422 | { } |
1431 | .ctl_name = 0 | ||
1432 | } | ||
1433 | }; | 1423 | }; |
1434 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ | 1424 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ |
1435 | #endif /* CONFIG_SYSCTL */ | 1425 | #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 |
162 | static struct ctl_table udp_compat_sysctl_table[] = { | 160 | static 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; | |||
146 | static struct ctl_table_header *udplite_sysctl_header; | 146 | static struct ctl_table_header *udplite_sysctl_header; |
147 | static struct ctl_table udplite_sysctl_table[] = { | 147 | static 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 | ||
341 | static ctl_table nf_ct_sysctl_table[] = { | 341 | static 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 | ||
398 | static ctl_table nf_ct_netfilter_table[] = { | 391 | static 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 | ||
410 | static struct ctl_path nf_ct_path[] = { | 402 | static 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 c93494fef8ef..565e0a31d521 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
@@ -216,9 +216,9 @@ static const struct file_operations nflog_file_ops = { | |||
216 | 216 | ||
217 | #ifdef CONFIG_SYSCTL | 217 | #ifdef CONFIG_SYSCTL |
218 | static struct ctl_path nf_log_sysctl_path[] = { | 218 | static struct ctl_path nf_log_sysctl_path[] = { |
219 | { .procname = "net", .ctl_name = CTL_NET, }, | 219 | { .procname = "net", }, |
220 | { .procname = "netfilter", .ctl_name = NET_NETFILTER, }, | 220 | { .procname = "netfilter", }, |
221 | { .procname = "nf_log", .ctl_name = CTL_UNNUMBERED, }, | 221 | { .procname = "nf_log", }, |
222 | { } | 222 | { } |
223 | }; | 223 | }; |
224 | 224 | ||
@@ -273,7 +273,6 @@ static __init int netfilter_log_sysctl_init(void) | |||
273 | 273 | ||
274 | for (i = NFPROTO_UNSPEC; i < NFPROTO_NUMPROTO; i++) { | 274 | for (i = NFPROTO_UNSPEC; i < NFPROTO_NUMPROTO; i++) { |
275 | snprintf(nf_log_sysctl_fnames[i-NFPROTO_UNSPEC], 3, "%d", i); | 275 | snprintf(nf_log_sysctl_fnames[i-NFPROTO_UNSPEC], 3, "%d", i); |
276 | nf_log_sysctl_table[i].ctl_name = CTL_UNNUMBERED; | ||
277 | nf_log_sysctl_table[i].procname = | 276 | nf_log_sysctl_table[i].procname = |
278 | nf_log_sysctl_fnames[i-NFPROTO_UNSPEC]; | 277 | nf_log_sysctl_fnames[i-NFPROTO_UNSPEC]; |
279 | nf_log_sysctl_table[i].data = NULL; | 278 | 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 | ||
37 | static ctl_table nr_table[] = { | 37 | static 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 | ||
173 | static struct ctl_path nr_path[] = { | 149 | static 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 | ||
85 | static struct ctl_table phonet_table[] = { | 85 | static 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 | ||
98 | static struct ctl_path phonet_ctl_path[] = { | 96 | static 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..517c6c9987ba 100644 --- a/net/rds/ib_sysctl.c +++ b/net/rds/ib_sysctl.c | |||
@@ -67,7 +67,6 @@ unsigned int rds_ib_sysctl_flow_control = 0; | |||
67 | 67 | ||
68 | ctl_table rds_ib_sysctl_table[] = { | 68 | ctl_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), |
@@ -77,7 +76,6 @@ ctl_table rds_ib_sysctl_table[] = { | |||
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), |
@@ -87,7 +85,6 @@ ctl_table rds_ib_sysctl_table[] = { | |||
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), |
@@ -97,7 +94,6 @@ ctl_table rds_ib_sysctl_table[] = { | |||
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), |
@@ -107,7 +103,6 @@ ctl_table rds_ib_sysctl_table[] = { | |||
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), |
@@ -115,20 +110,19 @@ ctl_table rds_ib_sysctl_table[] = { | |||
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 | ||
128 | static struct ctl_path rds_ib_sysctl_path[] = { | 122 | static 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..3e00b01559f2 100644 --- a/net/rds/iw_sysctl.c +++ b/net/rds/iw_sysctl.c | |||
@@ -57,7 +57,6 @@ unsigned int rds_iw_sysctl_flow_control = 1; | |||
57 | 57 | ||
58 | ctl_table rds_iw_sysctl_table[] = { | 58 | ctl_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), |
@@ -67,7 +66,6 @@ ctl_table rds_iw_sysctl_table[] = { | |||
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), |
@@ -77,7 +75,6 @@ ctl_table rds_iw_sysctl_table[] = { | |||
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), |
@@ -87,7 +84,6 @@ ctl_table rds_iw_sysctl_table[] = { | |||
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), |
@@ -97,7 +93,6 @@ ctl_table rds_iw_sysctl_table[] = { | |||
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), |
@@ -105,20 +100,19 @@ ctl_table rds_iw_sysctl_table[] = { | |||
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 | ||
118 | static struct ctl_path rds_iw_sysctl_path[] = { | 112 | static 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..8fb499ee3687 100644 --- a/net/rds/sysctl.c +++ b/net/rds/sysctl.c | |||
@@ -51,7 +51,6 @@ unsigned int rds_sysctl_ping_enable = 1; | |||
51 | 51 | ||
52 | static ctl_table rds_sysctl_rds_table[] = { | 52 | static 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), |
@@ -61,7 +60,6 @@ static ctl_table rds_sysctl_rds_table[] = { | |||
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), |
@@ -71,7 +69,6 @@ static ctl_table rds_sysctl_rds_table[] = { | |||
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), |
@@ -79,7 +76,6 @@ static ctl_table rds_sysctl_rds_table[] = { | |||
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), |
@@ -87,19 +83,18 @@ static ctl_table rds_sysctl_rds_table[] = { | |||
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 | ||
100 | static struct ctl_path rds_sysctl_path[] = { | 95 | static 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 | ||
27 | static ctl_table rose_table[] = { | 27 | static 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 | ||
141 | static struct ctl_path rose_path[] = { | 121 | static 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 ab7151da120f..c4ece9829541 100644 --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c | |||
@@ -59,180 +59,145 @@ extern int sysctl_sctp_wmem[3]; | |||
59 | 59 | ||
60 | static ctl_table sctp_table[] = { | 60 | static ctl_table sctp_table[] = { |
61 | { | 61 | { |
62 | .ctl_name = NET_SCTP_RTO_INITIAL, | ||
63 | .procname = "rto_initial", | 62 | .procname = "rto_initial", |
64 | .data = &sctp_rto_initial, | 63 | .data = &sctp_rto_initial, |
65 | .maxlen = sizeof(unsigned int), | 64 | .maxlen = sizeof(unsigned int), |
66 | .mode = 0644, | 65 | .mode = 0644, |
67 | .proc_handler = proc_dointvec_minmax, | 66 | .proc_handler = proc_dointvec_minmax, |
68 | .strategy = sysctl_intvec, | ||
69 | .extra1 = &one, | 67 | .extra1 = &one, |
70 | .extra2 = &timer_max | 68 | .extra2 = &timer_max |
71 | }, | 69 | }, |
72 | { | 70 | { |
73 | .ctl_name = NET_SCTP_RTO_MIN, | ||
74 | .procname = "rto_min", | 71 | .procname = "rto_min", |
75 | .data = &sctp_rto_min, | 72 | .data = &sctp_rto_min, |
76 | .maxlen = sizeof(unsigned int), | 73 | .maxlen = sizeof(unsigned int), |
77 | .mode = 0644, | 74 | .mode = 0644, |
78 | .proc_handler = proc_dointvec_minmax, | 75 | .proc_handler = proc_dointvec_minmax, |
79 | .strategy = sysctl_intvec, | ||
80 | .extra1 = &one, | 76 | .extra1 = &one, |
81 | .extra2 = &timer_max | 77 | .extra2 = &timer_max |
82 | }, | 78 | }, |
83 | { | 79 | { |
84 | .ctl_name = NET_SCTP_RTO_MAX, | ||
85 | .procname = "rto_max", | 80 | .procname = "rto_max", |
86 | .data = &sctp_rto_max, | 81 | .data = &sctp_rto_max, |
87 | .maxlen = sizeof(unsigned int), | 82 | .maxlen = sizeof(unsigned int), |
88 | .mode = 0644, | 83 | .mode = 0644, |
89 | .proc_handler = proc_dointvec_minmax, | 84 | .proc_handler = proc_dointvec_minmax, |
90 | .strategy = sysctl_intvec, | ||
91 | .extra1 = &one, | 85 | .extra1 = &one, |
92 | .extra2 = &timer_max | 86 | .extra2 = &timer_max |
93 | }, | 87 | }, |
94 | { | 88 | { |
95 | .ctl_name = NET_SCTP_VALID_COOKIE_LIFE, | ||
96 | .procname = "valid_cookie_life", | 89 | .procname = "valid_cookie_life", |
97 | .data = &sctp_valid_cookie_life, | 90 | .data = &sctp_valid_cookie_life, |
98 | .maxlen = sizeof(unsigned int), | 91 | .maxlen = sizeof(unsigned int), |
99 | .mode = 0644, | 92 | .mode = 0644, |
100 | .proc_handler = proc_dointvec_minmax, | 93 | .proc_handler = proc_dointvec_minmax, |
101 | .strategy = sysctl_intvec, | ||
102 | .extra1 = &one, | 94 | .extra1 = &one, |
103 | .extra2 = &timer_max | 95 | .extra2 = &timer_max |
104 | }, | 96 | }, |
105 | { | 97 | { |
106 | .ctl_name = NET_SCTP_MAX_BURST, | ||
107 | .procname = "max_burst", | 98 | .procname = "max_burst", |
108 | .data = &sctp_max_burst, | 99 | .data = &sctp_max_burst, |
109 | .maxlen = sizeof(int), | 100 | .maxlen = sizeof(int), |
110 | .mode = 0644, | 101 | .mode = 0644, |
111 | .proc_handler = proc_dointvec_minmax, | 102 | .proc_handler = proc_dointvec_minmax, |
112 | .strategy = sysctl_intvec, | ||
113 | .extra1 = &zero, | 103 | .extra1 = &zero, |
114 | .extra2 = &int_max | 104 | .extra2 = &int_max |
115 | }, | 105 | }, |
116 | { | 106 | { |
117 | .ctl_name = NET_SCTP_ASSOCIATION_MAX_RETRANS, | ||
118 | .procname = "association_max_retrans", | 107 | .procname = "association_max_retrans", |
119 | .data = &sctp_max_retrans_association, | 108 | .data = &sctp_max_retrans_association, |
120 | .maxlen = sizeof(int), | 109 | .maxlen = sizeof(int), |
121 | .mode = 0644, | 110 | .mode = 0644, |
122 | .proc_handler = proc_dointvec_minmax, | 111 | .proc_handler = proc_dointvec_minmax, |
123 | .strategy = sysctl_intvec, | ||
124 | .extra1 = &one, | 112 | .extra1 = &one, |
125 | .extra2 = &int_max | 113 | .extra2 = &int_max |
126 | }, | 114 | }, |
127 | { | 115 | { |
128 | .ctl_name = NET_SCTP_SNDBUF_POLICY, | ||
129 | .procname = "sndbuf_policy", | 116 | .procname = "sndbuf_policy", |
130 | .data = &sctp_sndbuf_policy, | 117 | .data = &sctp_sndbuf_policy, |
131 | .maxlen = sizeof(int), | 118 | .maxlen = sizeof(int), |
132 | .mode = 0644, | 119 | .mode = 0644, |
133 | .proc_handler = proc_dointvec, | 120 | .proc_handler = proc_dointvec, |
134 | .strategy = sysctl_intvec | ||
135 | }, | 121 | }, |
136 | { | 122 | { |
137 | .ctl_name = NET_SCTP_RCVBUF_POLICY, | ||
138 | .procname = "rcvbuf_policy", | 123 | .procname = "rcvbuf_policy", |
139 | .data = &sctp_rcvbuf_policy, | 124 | .data = &sctp_rcvbuf_policy, |
140 | .maxlen = sizeof(int), | 125 | .maxlen = sizeof(int), |
141 | .mode = 0644, | 126 | .mode = 0644, |
142 | .proc_handler = proc_dointvec, | 127 | .proc_handler = proc_dointvec, |
143 | .strategy = sysctl_intvec | ||
144 | }, | 128 | }, |
145 | { | 129 | { |
146 | .ctl_name = NET_SCTP_PATH_MAX_RETRANS, | ||
147 | .procname = "path_max_retrans", | 130 | .procname = "path_max_retrans", |
148 | .data = &sctp_max_retrans_path, | 131 | .data = &sctp_max_retrans_path, |
149 | .maxlen = sizeof(int), | 132 | .maxlen = sizeof(int), |
150 | .mode = 0644, | 133 | .mode = 0644, |
151 | .proc_handler = proc_dointvec_minmax, | 134 | .proc_handler = proc_dointvec_minmax, |
152 | .strategy = sysctl_intvec, | ||
153 | .extra1 = &one, | 135 | .extra1 = &one, |
154 | .extra2 = &int_max | 136 | .extra2 = &int_max |
155 | }, | 137 | }, |
156 | { | 138 | { |
157 | .ctl_name = NET_SCTP_MAX_INIT_RETRANSMITS, | ||
158 | .procname = "max_init_retransmits", | 139 | .procname = "max_init_retransmits", |
159 | .data = &sctp_max_retrans_init, | 140 | .data = &sctp_max_retrans_init, |
160 | .maxlen = sizeof(int), | 141 | .maxlen = sizeof(int), |
161 | .mode = 0644, | 142 | .mode = 0644, |
162 | .proc_handler = proc_dointvec_minmax, | 143 | .proc_handler = proc_dointvec_minmax, |
163 | .strategy = sysctl_intvec, | ||
164 | .extra1 = &one, | 144 | .extra1 = &one, |
165 | .extra2 = &int_max | 145 | .extra2 = &int_max |
166 | }, | 146 | }, |
167 | { | 147 | { |
168 | .ctl_name = NET_SCTP_HB_INTERVAL, | ||
169 | .procname = "hb_interval", | 148 | .procname = "hb_interval", |
170 | .data = &sctp_hb_interval, | 149 | .data = &sctp_hb_interval, |
171 | .maxlen = sizeof(unsigned int), | 150 | .maxlen = sizeof(unsigned int), |
172 | .mode = 0644, | 151 | .mode = 0644, |
173 | .proc_handler = proc_dointvec_minmax, | 152 | .proc_handler = proc_dointvec_minmax, |
174 | .strategy = sysctl_intvec, | ||
175 | .extra1 = &one, | 153 | .extra1 = &one, |
176 | .extra2 = &timer_max | 154 | .extra2 = &timer_max |
177 | }, | 155 | }, |
178 | { | 156 | { |
179 | .ctl_name = NET_SCTP_PRESERVE_ENABLE, | ||
180 | .procname = "cookie_preserve_enable", | 157 | .procname = "cookie_preserve_enable", |
181 | .data = &sctp_cookie_preserve_enable, | 158 | .data = &sctp_cookie_preserve_enable, |
182 | .maxlen = sizeof(int), | 159 | .maxlen = sizeof(int), |
183 | .mode = 0644, | 160 | .mode = 0644, |
184 | .proc_handler = proc_dointvec, | 161 | .proc_handler = proc_dointvec, |
185 | .strategy = sysctl_intvec | ||
186 | }, | 162 | }, |
187 | { | 163 | { |
188 | .ctl_name = NET_SCTP_RTO_ALPHA, | ||
189 | .procname = "rto_alpha_exp_divisor", | 164 | .procname = "rto_alpha_exp_divisor", |
190 | .data = &sctp_rto_alpha, | 165 | .data = &sctp_rto_alpha, |
191 | .maxlen = sizeof(int), | 166 | .maxlen = sizeof(int), |
192 | .mode = 0444, | 167 | .mode = 0444, |
193 | .proc_handler = proc_dointvec, | 168 | .proc_handler = proc_dointvec, |
194 | .strategy = sysctl_intvec | ||
195 | }, | 169 | }, |
196 | { | 170 | { |
197 | .ctl_name = NET_SCTP_RTO_BETA, | ||
198 | .procname = "rto_beta_exp_divisor", | 171 | .procname = "rto_beta_exp_divisor", |
199 | .data = &sctp_rto_beta, | 172 | .data = &sctp_rto_beta, |
200 | .maxlen = sizeof(int), | 173 | .maxlen = sizeof(int), |
201 | .mode = 0444, | 174 | .mode = 0444, |
202 | .proc_handler = proc_dointvec, | 175 | .proc_handler = proc_dointvec, |
203 | .strategy = sysctl_intvec | ||
204 | }, | 176 | }, |
205 | { | 177 | { |
206 | .ctl_name = NET_SCTP_ADDIP_ENABLE, | ||
207 | .procname = "addip_enable", | 178 | .procname = "addip_enable", |
208 | .data = &sctp_addip_enable, | 179 | .data = &sctp_addip_enable, |
209 | .maxlen = sizeof(int), | 180 | .maxlen = sizeof(int), |
210 | .mode = 0644, | 181 | .mode = 0644, |
211 | .proc_handler = proc_dointvec, | 182 | .proc_handler = proc_dointvec, |
212 | .strategy = sysctl_intvec | ||
213 | }, | 183 | }, |
214 | { | 184 | { |
215 | .ctl_name = NET_SCTP_PRSCTP_ENABLE, | ||
216 | .procname = "prsctp_enable", | 185 | .procname = "prsctp_enable", |
217 | .data = &sctp_prsctp_enable, | 186 | .data = &sctp_prsctp_enable, |
218 | .maxlen = sizeof(int), | 187 | .maxlen = sizeof(int), |
219 | .mode = 0644, | 188 | .mode = 0644, |
220 | .proc_handler = proc_dointvec, | 189 | .proc_handler = proc_dointvec, |
221 | .strategy = sysctl_intvec | ||
222 | }, | 190 | }, |
223 | { | 191 | { |
224 | .ctl_name = NET_SCTP_SACK_TIMEOUT, | ||
225 | .procname = "sack_timeout", | 192 | .procname = "sack_timeout", |
226 | .data = &sctp_sack_timeout, | 193 | .data = &sctp_sack_timeout, |
227 | .maxlen = sizeof(int), | 194 | .maxlen = sizeof(int), |
228 | .mode = 0644, | 195 | .mode = 0644, |
229 | .proc_handler = proc_dointvec_minmax, | 196 | .proc_handler = proc_dointvec_minmax, |
230 | .strategy = sysctl_intvec, | ||
231 | .extra1 = &sack_timer_min, | 197 | .extra1 = &sack_timer_min, |
232 | .extra2 = &sack_timer_max, | 198 | .extra2 = &sack_timer_max, |
233 | }, | 199 | }, |
234 | { | 200 | { |
235 | .ctl_name = CTL_UNNUMBERED, | ||
236 | .procname = "sctp_mem", | 201 | .procname = "sctp_mem", |
237 | .data = &sysctl_sctp_mem, | 202 | .data = &sysctl_sctp_mem, |
238 | .maxlen = sizeof(sysctl_sctp_mem), | 203 | .maxlen = sizeof(sysctl_sctp_mem), |
@@ -240,7 +205,6 @@ static ctl_table sctp_table[] = { | |||
240 | .proc_handler = proc_dointvec, | 205 | .proc_handler = proc_dointvec, |
241 | }, | 206 | }, |
242 | { | 207 | { |
243 | .ctl_name = CTL_UNNUMBERED, | ||
244 | .procname = "sctp_rmem", | 208 | .procname = "sctp_rmem", |
245 | .data = &sysctl_sctp_rmem, | 209 | .data = &sysctl_sctp_rmem, |
246 | .maxlen = sizeof(sysctl_sctp_rmem), | 210 | .maxlen = sizeof(sysctl_sctp_rmem), |
@@ -248,7 +212,6 @@ static ctl_table sctp_table[] = { | |||
248 | .proc_handler = proc_dointvec, | 212 | .proc_handler = proc_dointvec, |
249 | }, | 213 | }, |
250 | { | 214 | { |
251 | .ctl_name = CTL_UNNUMBERED, | ||
252 | .procname = "sctp_wmem", | 215 | .procname = "sctp_wmem", |
253 | .data = &sysctl_sctp_wmem, | 216 | .data = &sysctl_sctp_wmem, |
254 | .maxlen = sizeof(sysctl_sctp_wmem), | 217 | .maxlen = sizeof(sysctl_sctp_wmem), |
@@ -256,40 +219,34 @@ static ctl_table sctp_table[] = { | |||
256 | .proc_handler = proc_dointvec, | 219 | .proc_handler = proc_dointvec, |
257 | }, | 220 | }, |
258 | { | 221 | { |
259 | .ctl_name = CTL_UNNUMBERED, | ||
260 | .procname = "auth_enable", | 222 | .procname = "auth_enable", |
261 | .data = &sctp_auth_enable, | 223 | .data = &sctp_auth_enable, |
262 | .maxlen = sizeof(int), | 224 | .maxlen = sizeof(int), |
263 | .mode = 0644, | 225 | .mode = 0644, |
264 | .proc_handler = proc_dointvec, | 226 | .proc_handler = proc_dointvec, |
265 | .strategy = sysctl_intvec | ||
266 | }, | 227 | }, |
267 | { | 228 | { |
268 | .ctl_name = CTL_UNNUMBERED, | ||
269 | .procname = "addip_noauth_enable", | 229 | .procname = "addip_noauth_enable", |
270 | .data = &sctp_addip_noauth, | 230 | .data = &sctp_addip_noauth, |
271 | .maxlen = sizeof(int), | 231 | .maxlen = sizeof(int), |
272 | .mode = 0644, | 232 | .mode = 0644, |
273 | .proc_handler = proc_dointvec, | 233 | .proc_handler = proc_dointvec, |
274 | .strategy = sysctl_intvec | ||
275 | }, | 234 | }, |
276 | { | 235 | { |
277 | .ctl_name = CTL_UNNUMBERED, | ||
278 | .procname = "addr_scope_policy", | 236 | .procname = "addr_scope_policy", |
279 | .data = &sctp_scope_policy, | 237 | .data = &sctp_scope_policy, |
280 | .maxlen = sizeof(int), | 238 | .maxlen = sizeof(int), |
281 | .mode = 0644, | 239 | .mode = 0644, |
282 | .proc_handler = &proc_dointvec_minmax, | 240 | .proc_handler = &proc_dointvec_minmax, |
283 | .strategy = &sysctl_intvec, | ||
284 | .extra1 = &zero, | 241 | .extra1 = &zero, |
285 | .extra2 = &addr_scope_max, | 242 | .extra2 = &addr_scope_max, |
286 | }, | 243 | }, |
287 | { .ctl_name = 0 } | 244 | { } |
288 | }; | 245 | }; |
289 | 246 | ||
290 | static struct ctl_path sctp_path[] = { | 247 | static struct ctl_path sctp_path[] = { |
291 | { .procname = "net", .ctl_name = CTL_NET, }, | 248 | { .procname = "net", }, |
292 | { .procname = "sctp", .ctl_name = NET_SCTP, }, | 249 | { .procname = "sctp", }, |
293 | { } | 250 | { } |
294 | }; | 251 | }; |
295 | 252 | ||
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 42f9748ae093..f0ce326d0178 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c | |||
@@ -168,17 +168,16 @@ static ctl_table debug_table[] = { | |||
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 | ||
174 | static ctl_table sunrpc_table[] = { | 174 | static 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..678cee22013f 100644 --- a/net/sunrpc/xprtrdma/svc_rdma.c +++ b/net/sunrpc/xprtrdma/svc_rdma.c | |||
@@ -121,7 +121,6 @@ static ctl_table svcrdma_parm_table[] = { | |||
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 | }, |
@@ -131,7 +130,6 @@ static ctl_table svcrdma_parm_table[] = { | |||
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 | }, |
@@ -141,7 +139,6 @@ static ctl_table svcrdma_parm_table[] = { | |||
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 | }, |
@@ -209,9 +206,7 @@ static ctl_table svcrdma_parm_table[] = { | |||
209 | .mode = 0644, | 206 | .mode = 0644, |
210 | .proc_handler = &read_reset_stat, | 207 | .proc_handler = &read_reset_stat, |
211 | }, | 208 | }, |
212 | { | 209 | { }, |
213 | .ctl_name = 0, | ||
214 | }, | ||
215 | }; | 210 | }; |
216 | 211 | ||
217 | static ctl_table svcrdma_table[] = { | 212 | static 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 | ||
228 | static ctl_table svcrdma_root_table[] = { | 221 | static 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 | ||
240 | void svc_rdma_cleanup(void) | 230 | void svc_rdma_cleanup(void) |
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c index 9a63f669ece4..476816062243 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 | ||
87 | static ctl_table xr_tunables_table[] = { | 87 | static 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 | }, | 135 | }, |
147 | { | 136 | { }, |
148 | .ctl_name = 0, | ||
149 | }, | ||
150 | }; | 137 | }; |
151 | 138 | ||
152 | static ctl_table sunrpc_table[] = { | 139 | static 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..8b9a2079f2e3 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 | */ |
82 | static ctl_table xs_tunables_table[] = { | 82 | static 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 | }, |
@@ -130,23 +122,17 @@ static ctl_table xs_tunables_table[] = { | |||
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 | ||
140 | static ctl_table sunrpc_table[] = { | 129 | static 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 | ||
17 | static ctl_table unix_table[] = { | 17 | static 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 | ||
29 | static struct ctl_path unix_path[] = { | 28 | static 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 | ||
20 | static struct ctl_table x25_table[] = { | 20 | static 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 | ||
87 | static struct ctl_path x25_path[] = { | 76 | static 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 |
14 | static struct ctl_table xfrm_table[] = { | 14 | static 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, |