blob: 652685623519d74cca40682afbc7ade2785a8eab [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem.
3 *
4 * $Id: sysctl_net_ipv4.c,v 1.50 2001/10/20 00:00:11 davem Exp $
5 *
6 * Begun April 1, 1996, Mike Shaver.
7 * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS]
8 */
9
10#include <linux/mm.h>
11#include <linux/module.h>
12#include <linux/sysctl.h>
13#include <linux/config.h>
Arnaldo Carvalho de Melo20380732005-08-16 02:18:02 -030014#include <linux/igmp.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070015#include <net/snmp.h>
Arnaldo Carvalho de Melo20380732005-08-16 02:18:02 -030016#include <net/icmp.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#include <net/ip.h>
18#include <net/route.h>
19#include <net/tcp.h>
20
21/* From af_inet.c */
22extern int sysctl_ip_nonlocal_bind;
23
Linus Torvalds1da177e2005-04-16 15:20:36 -070024#ifdef CONFIG_SYSCTL
25static int tcp_retr1_max = 255;
26static int ip_local_port_range_min[] = { 1, 1 };
27static int ip_local_port_range_max[] = { 65535, 65535 };
28#endif
29
30struct ipv4_config ipv4_config;
31
Linus Torvalds1da177e2005-04-16 15:20:36 -070032#ifdef CONFIG_SYSCTL
33
34static
35int ipv4_sysctl_forward(ctl_table *ctl, int write, struct file * filp,
36 void __user *buffer, size_t *lenp, loff_t *ppos)
37{
38 int val = ipv4_devconf.forwarding;
39 int ret;
40
41 ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
42
43 if (write && ipv4_devconf.forwarding != val)
44 inet_forward_change();
45
46 return ret;
47}
48
49static int ipv4_sysctl_forward_strategy(ctl_table *table,
50 int __user *name, int nlen,
51 void __user *oldval, size_t __user *oldlenp,
52 void __user *newval, size_t newlen,
53 void **context)
54{
55 int *valp = table->data;
56 int new;
57
58 if (!newval || !newlen)
59 return 0;
60
61 if (newlen != sizeof(int))
62 return -EINVAL;
63
64 if (get_user(new, (int __user *)newval))
65 return -EFAULT;
66
67 if (new == *valp)
68 return 0;
69
70 if (oldval && oldlenp) {
71 size_t len;
72
73 if (get_user(len, oldlenp))
74 return -EFAULT;
75
76 if (len) {
77 if (len > table->maxlen)
78 len = table->maxlen;
79 if (copy_to_user(oldval, valp, len))
80 return -EFAULT;
81 if (put_user(len, oldlenp))
82 return -EFAULT;
83 }
84 }
85
86 *valp = new;
87 inet_forward_change();
88 return 1;
89}
90
Stephen Hemminger317a76f2005-06-23 12:19:55 -070091static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * filp,
92 void __user *buffer, size_t *lenp, loff_t *ppos)
93{
94 char val[TCP_CA_NAME_MAX];
95 ctl_table tbl = {
96 .data = val,
97 .maxlen = TCP_CA_NAME_MAX,
98 };
99 int ret;
100
101 tcp_get_default_congestion_control(val);
102
103 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);
104 if (write && ret == 0)
105 ret = tcp_set_default_congestion_control(val);
106 return ret;
107}
108
Arnaldo Carvalho de Melo20380732005-08-16 02:18:02 -0300109static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name,
110 int nlen, void __user *oldval,
111 size_t __user *oldlenp,
112 void __user *newval, size_t newlen,
113 void **context)
Stephen Hemminger317a76f2005-06-23 12:19:55 -0700114{
115 char val[TCP_CA_NAME_MAX];
116 ctl_table tbl = {
117 .data = val,
118 .maxlen = TCP_CA_NAME_MAX,
119 };
120 int ret;
121
122 tcp_get_default_congestion_control(val);
123 ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen,
124 context);
125 if (ret == 0 && newval && newlen)
126 ret = tcp_set_default_congestion_control(val);
127 return ret;
128}
129
130
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131ctl_table ipv4_table[] = {
132 {
133 .ctl_name = NET_IPV4_TCP_TIMESTAMPS,
134 .procname = "tcp_timestamps",
135 .data = &sysctl_tcp_timestamps,
136 .maxlen = sizeof(int),
137 .mode = 0644,
138 .proc_handler = &proc_dointvec
139 },
140 {
141 .ctl_name = NET_IPV4_TCP_WINDOW_SCALING,
142 .procname = "tcp_window_scaling",
143 .data = &sysctl_tcp_window_scaling,
144 .maxlen = sizeof(int),
145 .mode = 0644,
146 .proc_handler = &proc_dointvec
147 },
148 {
149 .ctl_name = NET_IPV4_TCP_SACK,
150 .procname = "tcp_sack",
151 .data = &sysctl_tcp_sack,
152 .maxlen = sizeof(int),
153 .mode = 0644,
154 .proc_handler = &proc_dointvec
155 },
156 {
157 .ctl_name = NET_IPV4_TCP_RETRANS_COLLAPSE,
158 .procname = "tcp_retrans_collapse",
159 .data = &sysctl_tcp_retrans_collapse,
160 .maxlen = sizeof(int),
161 .mode = 0644,
162 .proc_handler = &proc_dointvec
163 },
164 {
165 .ctl_name = NET_IPV4_FORWARD,
166 .procname = "ip_forward",
167 .data = &ipv4_devconf.forwarding,
168 .maxlen = sizeof(int),
169 .mode = 0644,
170 .proc_handler = &ipv4_sysctl_forward,
171 .strategy = &ipv4_sysctl_forward_strategy
172 },
173 {
174 .ctl_name = NET_IPV4_DEFAULT_TTL,
175 .procname = "ip_default_ttl",
176 .data = &sysctl_ip_default_ttl,
177 .maxlen = sizeof(int),
178 .mode = 0644,
179 .proc_handler = &ipv4_doint_and_flush,
180 .strategy = &ipv4_doint_and_flush_strategy,
181 },
182 {
183 .ctl_name = NET_IPV4_AUTOCONFIG,
184 .procname = "ip_autoconfig",
185 .data = &ipv4_config.autoconfig,
186 .maxlen = sizeof(int),
187 .mode = 0644,
188 .proc_handler = &proc_dointvec
189 },
190 {
191 .ctl_name = NET_IPV4_NO_PMTU_DISC,
192 .procname = "ip_no_pmtu_disc",
193 .data = &ipv4_config.no_pmtu_disc,
194 .maxlen = sizeof(int),
195 .mode = 0644,
196 .proc_handler = &proc_dointvec
197 },
198 {
199 .ctl_name = NET_IPV4_NONLOCAL_BIND,
200 .procname = "ip_nonlocal_bind",
201 .data = &sysctl_ip_nonlocal_bind,
202 .maxlen = sizeof(int),
203 .mode = 0644,
204 .proc_handler = &proc_dointvec
205 },
206 {
207 .ctl_name = NET_IPV4_TCP_SYN_RETRIES,
208 .procname = "tcp_syn_retries",
209 .data = &sysctl_tcp_syn_retries,
210 .maxlen = sizeof(int),
211 .mode = 0644,
212 .proc_handler = &proc_dointvec
213 },
214 {
215 .ctl_name = NET_TCP_SYNACK_RETRIES,
216 .procname = "tcp_synack_retries",
217 .data = &sysctl_tcp_synack_retries,
218 .maxlen = sizeof(int),
219 .mode = 0644,
220 .proc_handler = &proc_dointvec
221 },
222 {
223 .ctl_name = NET_TCP_MAX_ORPHANS,
224 .procname = "tcp_max_orphans",
225 .data = &sysctl_tcp_max_orphans,
226 .maxlen = sizeof(int),
227 .mode = 0644,
228 .proc_handler = &proc_dointvec
229 },
230 {
231 .ctl_name = NET_TCP_MAX_TW_BUCKETS,
232 .procname = "tcp_max_tw_buckets",
Arnaldo Carvalho de Melo295ff7e2005-08-09 20:44:40 -0700233 .data = &tcp_death_row.sysctl_max_tw_buckets,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700234 .maxlen = sizeof(int),
235 .mode = 0644,
236 .proc_handler = &proc_dointvec
237 },
238 {
239 .ctl_name = NET_IPV4_IPFRAG_HIGH_THRESH,
240 .procname = "ipfrag_high_thresh",
241 .data = &sysctl_ipfrag_high_thresh,
242 .maxlen = sizeof(int),
243 .mode = 0644,
244 .proc_handler = &proc_dointvec
245 },
246 {
247 .ctl_name = NET_IPV4_IPFRAG_LOW_THRESH,
248 .procname = "ipfrag_low_thresh",
249 .data = &sysctl_ipfrag_low_thresh,
250 .maxlen = sizeof(int),
251 .mode = 0644,
252 .proc_handler = &proc_dointvec
253 },
254 {
255 .ctl_name = NET_IPV4_DYNADDR,
256 .procname = "ip_dynaddr",
257 .data = &sysctl_ip_dynaddr,
258 .maxlen = sizeof(int),
259 .mode = 0644,
260 .proc_handler = &proc_dointvec
261 },
262 {
263 .ctl_name = NET_IPV4_IPFRAG_TIME,
264 .procname = "ipfrag_time",
265 .data = &sysctl_ipfrag_time,
266 .maxlen = sizeof(int),
267 .mode = 0644,
268 .proc_handler = &proc_dointvec_jiffies,
269 .strategy = &sysctl_jiffies
270 },
271 {
272 .ctl_name = NET_IPV4_TCP_KEEPALIVE_TIME,
273 .procname = "tcp_keepalive_time",
274 .data = &sysctl_tcp_keepalive_time,
275 .maxlen = sizeof(int),
276 .mode = 0644,
277 .proc_handler = &proc_dointvec_jiffies,
278 .strategy = &sysctl_jiffies
279 },
280 {
281 .ctl_name = NET_IPV4_TCP_KEEPALIVE_PROBES,
282 .procname = "tcp_keepalive_probes",
283 .data = &sysctl_tcp_keepalive_probes,
284 .maxlen = sizeof(int),
285 .mode = 0644,
286 .proc_handler = &proc_dointvec
287 },
288 {
289 .ctl_name = NET_IPV4_TCP_KEEPALIVE_INTVL,
290 .procname = "tcp_keepalive_intvl",
291 .data = &sysctl_tcp_keepalive_intvl,
292 .maxlen = sizeof(int),
293 .mode = 0644,
294 .proc_handler = &proc_dointvec_jiffies,
295 .strategy = &sysctl_jiffies
296 },
297 {
298 .ctl_name = NET_IPV4_TCP_RETRIES1,
299 .procname = "tcp_retries1",
300 .data = &sysctl_tcp_retries1,
301 .maxlen = sizeof(int),
302 .mode = 0644,
303 .proc_handler = &proc_dointvec_minmax,
304 .strategy = &sysctl_intvec,
305 .extra2 = &tcp_retr1_max
306 },
307 {
308 .ctl_name = NET_IPV4_TCP_RETRIES2,
309 .procname = "tcp_retries2",
310 .data = &sysctl_tcp_retries2,
311 .maxlen = sizeof(int),
312 .mode = 0644,
313 .proc_handler = &proc_dointvec
314 },
315 {
316 .ctl_name = NET_IPV4_TCP_FIN_TIMEOUT,
317 .procname = "tcp_fin_timeout",
318 .data = &sysctl_tcp_fin_timeout,
319 .maxlen = sizeof(int),
320 .mode = 0644,
321 .proc_handler = &proc_dointvec_jiffies,
322 .strategy = &sysctl_jiffies
323 },
324#ifdef CONFIG_SYN_COOKIES
325 {
326 .ctl_name = NET_TCP_SYNCOOKIES,
327 .procname = "tcp_syncookies",
328 .data = &sysctl_tcp_syncookies,
329 .maxlen = sizeof(int),
330 .mode = 0644,
331 .proc_handler = &proc_dointvec
332 },
333#endif
334 {
335 .ctl_name = NET_TCP_TW_RECYCLE,
336 .procname = "tcp_tw_recycle",
Arnaldo Carvalho de Melo295ff7e2005-08-09 20:44:40 -0700337 .data = &tcp_death_row.sysctl_tw_recycle,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700338 .maxlen = sizeof(int),
339 .mode = 0644,
340 .proc_handler = &proc_dointvec
341 },
342 {
343 .ctl_name = NET_TCP_ABORT_ON_OVERFLOW,
344 .procname = "tcp_abort_on_overflow",
345 .data = &sysctl_tcp_abort_on_overflow,
346 .maxlen = sizeof(int),
347 .mode = 0644,
348 .proc_handler = &proc_dointvec
349 },
350 {
351 .ctl_name = NET_TCP_STDURG,
352 .procname = "tcp_stdurg",
353 .data = &sysctl_tcp_stdurg,
354 .maxlen = sizeof(int),
355 .mode = 0644,
356 .proc_handler = &proc_dointvec
357 },
358 {
359 .ctl_name = NET_TCP_RFC1337,
360 .procname = "tcp_rfc1337",
361 .data = &sysctl_tcp_rfc1337,
362 .maxlen = sizeof(int),
363 .mode = 0644,
364 .proc_handler = &proc_dointvec
365 },
366 {
367 .ctl_name = NET_TCP_MAX_SYN_BACKLOG,
368 .procname = "tcp_max_syn_backlog",
369 .data = &sysctl_max_syn_backlog,
370 .maxlen = sizeof(int),
371 .mode = 0644,
372 .proc_handler = &proc_dointvec
373 },
374 {
375 .ctl_name = NET_IPV4_LOCAL_PORT_RANGE,
376 .procname = "ip_local_port_range",
377 .data = &sysctl_local_port_range,
378 .maxlen = sizeof(sysctl_local_port_range),
379 .mode = 0644,
380 .proc_handler = &proc_dointvec_minmax,
381 .strategy = &sysctl_intvec,
382 .extra1 = ip_local_port_range_min,
383 .extra2 = ip_local_port_range_max
384 },
385 {
386 .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_ALL,
387 .procname = "icmp_echo_ignore_all",
388 .data = &sysctl_icmp_echo_ignore_all,
389 .maxlen = sizeof(int),
390 .mode = 0644,
391 .proc_handler = &proc_dointvec
392 },
393 {
394 .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS,
395 .procname = "icmp_echo_ignore_broadcasts",
396 .data = &sysctl_icmp_echo_ignore_broadcasts,
397 .maxlen = sizeof(int),
398 .mode = 0644,
399 .proc_handler = &proc_dointvec
400 },
401 {
402 .ctl_name = NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES,
403 .procname = "icmp_ignore_bogus_error_responses",
404 .data = &sysctl_icmp_ignore_bogus_error_responses,
405 .maxlen = sizeof(int),
406 .mode = 0644,
407 .proc_handler = &proc_dointvec
408 },
409 {
J. Simonetti1c2fb7f2005-06-13 15:19:03 -0700410 .ctl_name = NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR,
411 .procname = "icmp_errors_use_inbound_ifaddr",
412 .data = &sysctl_icmp_errors_use_inbound_ifaddr,
413 .maxlen = sizeof(int),
414 .mode = 0644,
415 .proc_handler = &proc_dointvec
416 },
417 {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700418 .ctl_name = NET_IPV4_ROUTE,
419 .procname = "route",
420 .maxlen = 0,
421 .mode = 0555,
422 .child = ipv4_route_table
423 },
424#ifdef CONFIG_IP_MULTICAST
425 {
426 .ctl_name = NET_IPV4_IGMP_MAX_MEMBERSHIPS,
427 .procname = "igmp_max_memberships",
428 .data = &sysctl_igmp_max_memberships,
429 .maxlen = sizeof(int),
430 .mode = 0644,
431 .proc_handler = &proc_dointvec
432 },
433
434#endif
435 {
436 .ctl_name = NET_IPV4_IGMP_MAX_MSF,
437 .procname = "igmp_max_msf",
438 .data = &sysctl_igmp_max_msf,
439 .maxlen = sizeof(int),
440 .mode = 0644,
441 .proc_handler = &proc_dointvec
442 },
443 {
444 .ctl_name = NET_IPV4_INET_PEER_THRESHOLD,
445 .procname = "inet_peer_threshold",
446 .data = &inet_peer_threshold,
447 .maxlen = sizeof(int),
448 .mode = 0644,
449 .proc_handler = &proc_dointvec
450 },
451 {
452 .ctl_name = NET_IPV4_INET_PEER_MINTTL,
453 .procname = "inet_peer_minttl",
454 .data = &inet_peer_minttl,
455 .maxlen = sizeof(int),
456 .mode = 0644,
457 .proc_handler = &proc_dointvec_jiffies,
458 .strategy = &sysctl_jiffies
459 },
460 {
461 .ctl_name = NET_IPV4_INET_PEER_MAXTTL,
462 .procname = "inet_peer_maxttl",
463 .data = &inet_peer_maxttl,
464 .maxlen = sizeof(int),
465 .mode = 0644,
466 .proc_handler = &proc_dointvec_jiffies,
467 .strategy = &sysctl_jiffies
468 },
469 {
470 .ctl_name = NET_IPV4_INET_PEER_GC_MINTIME,
471 .procname = "inet_peer_gc_mintime",
472 .data = &inet_peer_gc_mintime,
473 .maxlen = sizeof(int),
474 .mode = 0644,
475 .proc_handler = &proc_dointvec_jiffies,
476 .strategy = &sysctl_jiffies
477 },
478 {
479 .ctl_name = NET_IPV4_INET_PEER_GC_MAXTIME,
480 .procname = "inet_peer_gc_maxtime",
481 .data = &inet_peer_gc_maxtime,
482 .maxlen = sizeof(int),
483 .mode = 0644,
484 .proc_handler = &proc_dointvec_jiffies,
485 .strategy = &sysctl_jiffies
486 },
487 {
488 .ctl_name = NET_TCP_ORPHAN_RETRIES,
489 .procname = "tcp_orphan_retries",
490 .data = &sysctl_tcp_orphan_retries,
491 .maxlen = sizeof(int),
492 .mode = 0644,
493 .proc_handler = &proc_dointvec
494 },
495 {
496 .ctl_name = NET_TCP_FACK,
497 .procname = "tcp_fack",
498 .data = &sysctl_tcp_fack,
499 .maxlen = sizeof(int),
500 .mode = 0644,
501 .proc_handler = &proc_dointvec
502 },
503 {
504 .ctl_name = NET_TCP_REORDERING,
505 .procname = "tcp_reordering",
506 .data = &sysctl_tcp_reordering,
507 .maxlen = sizeof(int),
508 .mode = 0644,
509 .proc_handler = &proc_dointvec
510 },
511 {
512 .ctl_name = NET_TCP_ECN,
513 .procname = "tcp_ecn",
514 .data = &sysctl_tcp_ecn,
515 .maxlen = sizeof(int),
516 .mode = 0644,
517 .proc_handler = &proc_dointvec
518 },
519 {
520 .ctl_name = NET_TCP_DSACK,
521 .procname = "tcp_dsack",
522 .data = &sysctl_tcp_dsack,
523 .maxlen = sizeof(int),
524 .mode = 0644,
525 .proc_handler = &proc_dointvec
526 },
527 {
528 .ctl_name = NET_TCP_MEM,
529 .procname = "tcp_mem",
530 .data = &sysctl_tcp_mem,
531 .maxlen = sizeof(sysctl_tcp_mem),
532 .mode = 0644,
533 .proc_handler = &proc_dointvec
534 },
535 {
536 .ctl_name = NET_TCP_WMEM,
537 .procname = "tcp_wmem",
538 .data = &sysctl_tcp_wmem,
539 .maxlen = sizeof(sysctl_tcp_wmem),
540 .mode = 0644,
541 .proc_handler = &proc_dointvec
542 },
543 {
544 .ctl_name = NET_TCP_RMEM,
545 .procname = "tcp_rmem",
546 .data = &sysctl_tcp_rmem,
547 .maxlen = sizeof(sysctl_tcp_rmem),
548 .mode = 0644,
549 .proc_handler = &proc_dointvec
550 },
551 {
552 .ctl_name = NET_TCP_APP_WIN,
553 .procname = "tcp_app_win",
554 .data = &sysctl_tcp_app_win,
555 .maxlen = sizeof(int),
556 .mode = 0644,
557 .proc_handler = &proc_dointvec
558 },
559 {
560 .ctl_name = NET_TCP_ADV_WIN_SCALE,
561 .procname = "tcp_adv_win_scale",
562 .data = &sysctl_tcp_adv_win_scale,
563 .maxlen = sizeof(int),
564 .mode = 0644,
565 .proc_handler = &proc_dointvec
566 },
567 {
568 .ctl_name = NET_IPV4_ICMP_RATELIMIT,
569 .procname = "icmp_ratelimit",
570 .data = &sysctl_icmp_ratelimit,
571 .maxlen = sizeof(int),
572 .mode = 0644,
573 .proc_handler = &proc_dointvec
574 },
575 {
576 .ctl_name = NET_IPV4_ICMP_RATEMASK,
577 .procname = "icmp_ratemask",
578 .data = &sysctl_icmp_ratemask,
579 .maxlen = sizeof(int),
580 .mode = 0644,
581 .proc_handler = &proc_dointvec
582 },
583 {
584 .ctl_name = NET_TCP_TW_REUSE,
585 .procname = "tcp_tw_reuse",
586 .data = &sysctl_tcp_tw_reuse,
587 .maxlen = sizeof(int),
588 .mode = 0644,
589 .proc_handler = &proc_dointvec
590 },
591 {
592 .ctl_name = NET_TCP_FRTO,
593 .procname = "tcp_frto",
594 .data = &sysctl_tcp_frto,
595 .maxlen = sizeof(int),
596 .mode = 0644,
597 .proc_handler = &proc_dointvec
598 },
599 {
600 .ctl_name = NET_TCP_LOW_LATENCY,
601 .procname = "tcp_low_latency",
602 .data = &sysctl_tcp_low_latency,
603 .maxlen = sizeof(int),
604 .mode = 0644,
605 .proc_handler = &proc_dointvec
606 },
607 {
608 .ctl_name = NET_IPV4_IPFRAG_SECRET_INTERVAL,
609 .procname = "ipfrag_secret_interval",
610 .data = &sysctl_ipfrag_secret_interval,
611 .maxlen = sizeof(int),
612 .mode = 0644,
613 .proc_handler = &proc_dointvec_jiffies,
614 .strategy = &sysctl_jiffies
615 },
616 {
617 .ctl_name = NET_TCP_NO_METRICS_SAVE,
618 .procname = "tcp_no_metrics_save",
619 .data = &sysctl_tcp_nometrics_save,
620 .maxlen = sizeof(int),
621 .mode = 0644,
622 .proc_handler = &proc_dointvec,
623 },
624 {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700625 .ctl_name = NET_TCP_MODERATE_RCVBUF,
626 .procname = "tcp_moderate_rcvbuf",
627 .data = &sysctl_tcp_moderate_rcvbuf,
628 .maxlen = sizeof(int),
629 .mode = 0644,
630 .proc_handler = &proc_dointvec,
631 },
632 {
633 .ctl_name = NET_TCP_TSO_WIN_DIVISOR,
634 .procname = "tcp_tso_win_divisor",
635 .data = &sysctl_tcp_tso_win_divisor,
636 .maxlen = sizeof(int),
637 .mode = 0644,
638 .proc_handler = &proc_dointvec,
639 },
640 {
Stephen Hemminger317a76f2005-06-23 12:19:55 -0700641 .ctl_name = NET_TCP_CONG_CONTROL,
642 .procname = "tcp_congestion_control",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700643 .mode = 0644,
Stephen Hemminger317a76f2005-06-23 12:19:55 -0700644 .maxlen = TCP_CA_NAME_MAX,
645 .proc_handler = &proc_tcp_congestion_control,
646 .strategy = &sysctl_tcp_congestion_control,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700647 },
Stephen Hemminger317a76f2005-06-23 12:19:55 -0700648
Linus Torvalds1da177e2005-04-16 15:20:36 -0700649 { .ctl_name = 0 }
650};
651
652#endif /* CONFIG_SYSCTL */
653
654EXPORT_SYMBOL(ipv4_config);