2 * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem.
4 * $Id: sysctl_net_ipv4.c,v 1.50 2001/10/20 00:00:11 davem Exp $
6 * Begun April 1, 1996, Mike Shaver.
7 * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS]
11 #include <linux/module.h>
12 #include <linux/sysctl.h>
13 #include <linux/igmp.h>
14 #include <linux/inetdevice.h>
15 #include <linux/seqlock.h>
19 #include <net/route.h>
21 #include <net/cipso_ipv4.h>
22 #include <net/inet_frag.h>
25 extern int sysctl_ip_nonlocal_bind;
29 static int tcp_retr1_max = 255;
30 static int ip_local_port_range_min[] = { 1, 1 };
31 static int ip_local_port_range_max[] = { 65535, 65535 };
34 struct ipv4_config ipv4_config;
39 int ipv4_sysctl_forward(ctl_table *ctl, int write, struct file * filp,
40 void __user *buffer, size_t *lenp, loff_t *ppos)
42 int val = IPV4_DEVCONF_ALL(FORWARDING);
45 ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
47 if (write && IPV4_DEVCONF_ALL(FORWARDING) != val)
48 inet_forward_change();
53 static int ipv4_sysctl_forward_strategy(ctl_table *table,
54 int __user *name, int nlen,
55 void __user *oldval, size_t __user *oldlenp,
56 void __user *newval, size_t newlen)
58 int *valp = table->data;
61 if (!newval || !newlen)
64 if (newlen != sizeof(int))
67 if (get_user(new, (int __user *)newval))
73 if (oldval && oldlenp) {
76 if (get_user(len, oldlenp))
80 if (len > table->maxlen)
82 if (copy_to_user(oldval, valp, len))
84 if (put_user(len, oldlenp))
90 inet_forward_change();
94 extern seqlock_t sysctl_port_range_lock;
95 extern int sysctl_local_port_range[2];
97 /* Update system visible IP port range */
98 static void set_local_port_range(int range[2])
100 write_seqlock(&sysctl_port_range_lock);
101 sysctl_local_port_range[0] = range[0];
102 sysctl_local_port_range[1] = range[1];
103 write_sequnlock(&sysctl_port_range_lock);
106 /* Validate changes from /proc interface. */
107 static int ipv4_local_port_range(ctl_table *table, int write, struct file *filp,
109 size_t *lenp, loff_t *ppos)
112 int range[2] = { sysctl_local_port_range[0],
113 sysctl_local_port_range[1] };
116 .maxlen = sizeof(range),
118 .extra1 = &ip_local_port_range_min,
119 .extra2 = &ip_local_port_range_max,
122 ret = proc_dointvec_minmax(&tmp, write, filp, buffer, lenp, ppos);
124 if (write && ret == 0) {
125 if (range[1] < range[0])
128 set_local_port_range(range);
134 /* Validate changes from sysctl interface. */
135 static int ipv4_sysctl_local_port_range(ctl_table *table, int __user *name,
136 int nlen, void __user *oldval,
137 size_t __user *oldlenp,
138 void __user *newval, size_t newlen)
141 int range[2] = { sysctl_local_port_range[0],
142 sysctl_local_port_range[1] };
145 .maxlen = sizeof(range),
147 .extra1 = &ip_local_port_range_min,
148 .extra2 = &ip_local_port_range_max,
151 ret = sysctl_intvec(&tmp, name, nlen, oldval, oldlenp, newval, newlen);
152 if (ret == 0 && newval && newlen) {
153 if (range[1] < range[0])
156 set_local_port_range(range);
162 static int proc_tcp_congestion_control(ctl_table *ctl, int write, struct file * filp,
163 void __user *buffer, size_t *lenp, loff_t *ppos)
165 char val[TCP_CA_NAME_MAX];
168 .maxlen = TCP_CA_NAME_MAX,
172 tcp_get_default_congestion_control(val);
174 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);
175 if (write && ret == 0)
176 ret = tcp_set_default_congestion_control(val);
180 static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name,
181 int nlen, void __user *oldval,
182 size_t __user *oldlenp,
183 void __user *newval, size_t newlen)
185 char val[TCP_CA_NAME_MAX];
188 .maxlen = TCP_CA_NAME_MAX,
192 tcp_get_default_congestion_control(val);
193 ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
194 if (ret == 1 && newval && newlen)
195 ret = tcp_set_default_congestion_control(val);
199 static int proc_tcp_available_congestion_control(ctl_table *ctl,
200 int write, struct file * filp,
201 void __user *buffer, size_t *lenp,
204 ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX, };
207 tbl.data = kmalloc(tbl.maxlen, GFP_USER);
210 tcp_get_available_congestion_control(tbl.data, TCP_CA_BUF_MAX);
211 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);
216 static int proc_allowed_congestion_control(ctl_table *ctl,
217 int write, struct file * filp,
218 void __user *buffer, size_t *lenp,
221 ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX };
224 tbl.data = kmalloc(tbl.maxlen, GFP_USER);
228 tcp_get_allowed_congestion_control(tbl.data, tbl.maxlen);
229 ret = proc_dostring(&tbl, write, filp, buffer, lenp, ppos);
230 if (write && ret == 0)
231 ret = tcp_set_allowed_congestion_control(tbl.data);
236 static int strategy_allowed_congestion_control(ctl_table *table, int __user *name,
237 int nlen, void __user *oldval,
238 size_t __user *oldlenp,
242 ctl_table tbl = { .maxlen = TCP_CA_BUF_MAX };
245 tbl.data = kmalloc(tbl.maxlen, GFP_USER);
249 tcp_get_available_congestion_control(tbl.data, tbl.maxlen);
250 ret = sysctl_string(&tbl, name, nlen, oldval, oldlenp, newval, newlen);
251 if (ret == 0 && newval && newlen)
252 ret = tcp_set_allowed_congestion_control(tbl.data);
259 ctl_table ipv4_table[] = {
261 .ctl_name = NET_IPV4_TCP_TIMESTAMPS,
262 .procname = "tcp_timestamps",
263 .data = &sysctl_tcp_timestamps,
264 .maxlen = sizeof(int),
266 .proc_handler = &proc_dointvec
269 .ctl_name = NET_IPV4_TCP_WINDOW_SCALING,
270 .procname = "tcp_window_scaling",
271 .data = &sysctl_tcp_window_scaling,
272 .maxlen = sizeof(int),
274 .proc_handler = &proc_dointvec
277 .ctl_name = NET_IPV4_TCP_SACK,
278 .procname = "tcp_sack",
279 .data = &sysctl_tcp_sack,
280 .maxlen = sizeof(int),
282 .proc_handler = &proc_dointvec
285 .ctl_name = NET_IPV4_TCP_RETRANS_COLLAPSE,
286 .procname = "tcp_retrans_collapse",
287 .data = &sysctl_tcp_retrans_collapse,
288 .maxlen = sizeof(int),
290 .proc_handler = &proc_dointvec
293 .ctl_name = NET_IPV4_FORWARD,
294 .procname = "ip_forward",
295 .data = &IPV4_DEVCONF_ALL(FORWARDING),
296 .maxlen = sizeof(int),
298 .proc_handler = &ipv4_sysctl_forward,
299 .strategy = &ipv4_sysctl_forward_strategy
302 .ctl_name = NET_IPV4_DEFAULT_TTL,
303 .procname = "ip_default_ttl",
304 .data = &sysctl_ip_default_ttl,
305 .maxlen = sizeof(int),
307 .proc_handler = &ipv4_doint_and_flush,
308 .strategy = &ipv4_doint_and_flush_strategy,
311 .ctl_name = NET_IPV4_NO_PMTU_DISC,
312 .procname = "ip_no_pmtu_disc",
313 .data = &ipv4_config.no_pmtu_disc,
314 .maxlen = sizeof(int),
316 .proc_handler = &proc_dointvec
319 .ctl_name = NET_IPV4_NONLOCAL_BIND,
320 .procname = "ip_nonlocal_bind",
321 .data = &sysctl_ip_nonlocal_bind,
322 .maxlen = sizeof(int),
324 .proc_handler = &proc_dointvec
327 .ctl_name = NET_IPV4_TCP_SYN_RETRIES,
328 .procname = "tcp_syn_retries",
329 .data = &sysctl_tcp_syn_retries,
330 .maxlen = sizeof(int),
332 .proc_handler = &proc_dointvec
335 .ctl_name = NET_TCP_SYNACK_RETRIES,
336 .procname = "tcp_synack_retries",
337 .data = &sysctl_tcp_synack_retries,
338 .maxlen = sizeof(int),
340 .proc_handler = &proc_dointvec
343 .ctl_name = NET_TCP_MAX_ORPHANS,
344 .procname = "tcp_max_orphans",
345 .data = &sysctl_tcp_max_orphans,
346 .maxlen = sizeof(int),
348 .proc_handler = &proc_dointvec
351 .ctl_name = NET_TCP_MAX_TW_BUCKETS,
352 .procname = "tcp_max_tw_buckets",
353 .data = &tcp_death_row.sysctl_max_tw_buckets,
354 .maxlen = sizeof(int),
356 .proc_handler = &proc_dointvec
359 .ctl_name = NET_IPV4_IPFRAG_HIGH_THRESH,
360 .procname = "ipfrag_high_thresh",
361 .data = &ip4_frags_ctl.high_thresh,
362 .maxlen = sizeof(int),
364 .proc_handler = &proc_dointvec
367 .ctl_name = NET_IPV4_IPFRAG_LOW_THRESH,
368 .procname = "ipfrag_low_thresh",
369 .data = &ip4_frags_ctl.low_thresh,
370 .maxlen = sizeof(int),
372 .proc_handler = &proc_dointvec
375 .ctl_name = NET_IPV4_DYNADDR,
376 .procname = "ip_dynaddr",
377 .data = &sysctl_ip_dynaddr,
378 .maxlen = sizeof(int),
380 .proc_handler = &proc_dointvec
383 .ctl_name = NET_IPV4_IPFRAG_TIME,
384 .procname = "ipfrag_time",
385 .data = &ip4_frags_ctl.timeout,
386 .maxlen = sizeof(int),
388 .proc_handler = &proc_dointvec_jiffies,
389 .strategy = &sysctl_jiffies
392 .ctl_name = NET_IPV4_TCP_KEEPALIVE_TIME,
393 .procname = "tcp_keepalive_time",
394 .data = &sysctl_tcp_keepalive_time,
395 .maxlen = sizeof(int),
397 .proc_handler = &proc_dointvec_jiffies,
398 .strategy = &sysctl_jiffies
401 .ctl_name = NET_IPV4_TCP_KEEPALIVE_PROBES,
402 .procname = "tcp_keepalive_probes",
403 .data = &sysctl_tcp_keepalive_probes,
404 .maxlen = sizeof(int),
406 .proc_handler = &proc_dointvec
409 .ctl_name = NET_IPV4_TCP_KEEPALIVE_INTVL,
410 .procname = "tcp_keepalive_intvl",
411 .data = &sysctl_tcp_keepalive_intvl,
412 .maxlen = sizeof(int),
414 .proc_handler = &proc_dointvec_jiffies,
415 .strategy = &sysctl_jiffies
418 .ctl_name = NET_IPV4_TCP_RETRIES1,
419 .procname = "tcp_retries1",
420 .data = &sysctl_tcp_retries1,
421 .maxlen = sizeof(int),
423 .proc_handler = &proc_dointvec_minmax,
424 .strategy = &sysctl_intvec,
425 .extra2 = &tcp_retr1_max
428 .ctl_name = NET_IPV4_TCP_RETRIES2,
429 .procname = "tcp_retries2",
430 .data = &sysctl_tcp_retries2,
431 .maxlen = sizeof(int),
433 .proc_handler = &proc_dointvec
436 .ctl_name = NET_IPV4_TCP_FIN_TIMEOUT,
437 .procname = "tcp_fin_timeout",
438 .data = &sysctl_tcp_fin_timeout,
439 .maxlen = sizeof(int),
441 .proc_handler = &proc_dointvec_jiffies,
442 .strategy = &sysctl_jiffies
444 #ifdef CONFIG_SYN_COOKIES
446 .ctl_name = NET_TCP_SYNCOOKIES,
447 .procname = "tcp_syncookies",
448 .data = &sysctl_tcp_syncookies,
449 .maxlen = sizeof(int),
451 .proc_handler = &proc_dointvec
455 .ctl_name = NET_TCP_TW_RECYCLE,
456 .procname = "tcp_tw_recycle",
457 .data = &tcp_death_row.sysctl_tw_recycle,
458 .maxlen = sizeof(int),
460 .proc_handler = &proc_dointvec
463 .ctl_name = NET_TCP_ABORT_ON_OVERFLOW,
464 .procname = "tcp_abort_on_overflow",
465 .data = &sysctl_tcp_abort_on_overflow,
466 .maxlen = sizeof(int),
468 .proc_handler = &proc_dointvec
471 .ctl_name = NET_TCP_STDURG,
472 .procname = "tcp_stdurg",
473 .data = &sysctl_tcp_stdurg,
474 .maxlen = sizeof(int),
476 .proc_handler = &proc_dointvec
479 .ctl_name = NET_TCP_RFC1337,
480 .procname = "tcp_rfc1337",
481 .data = &sysctl_tcp_rfc1337,
482 .maxlen = sizeof(int),
484 .proc_handler = &proc_dointvec
487 .ctl_name = NET_TCP_MAX_SYN_BACKLOG,
488 .procname = "tcp_max_syn_backlog",
489 .data = &sysctl_max_syn_backlog,
490 .maxlen = sizeof(int),
492 .proc_handler = &proc_dointvec
495 .ctl_name = NET_IPV4_LOCAL_PORT_RANGE,
496 .procname = "ip_local_port_range",
497 .data = &sysctl_local_port_range,
498 .maxlen = sizeof(sysctl_local_port_range),
500 .proc_handler = &ipv4_local_port_range,
501 .strategy = &ipv4_sysctl_local_port_range,
504 .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_ALL,
505 .procname = "icmp_echo_ignore_all",
506 .data = &sysctl_icmp_echo_ignore_all,
507 .maxlen = sizeof(int),
509 .proc_handler = &proc_dointvec
512 .ctl_name = NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS,
513 .procname = "icmp_echo_ignore_broadcasts",
514 .data = &sysctl_icmp_echo_ignore_broadcasts,
515 .maxlen = sizeof(int),
517 .proc_handler = &proc_dointvec
520 .ctl_name = NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES,
521 .procname = "icmp_ignore_bogus_error_responses",
522 .data = &sysctl_icmp_ignore_bogus_error_responses,
523 .maxlen = sizeof(int),
525 .proc_handler = &proc_dointvec
528 .ctl_name = NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR,
529 .procname = "icmp_errors_use_inbound_ifaddr",
530 .data = &sysctl_icmp_errors_use_inbound_ifaddr,
531 .maxlen = sizeof(int),
533 .proc_handler = &proc_dointvec
536 .ctl_name = NET_IPV4_ROUTE,
540 .child = ipv4_route_table
542 #ifdef CONFIG_IP_MULTICAST
544 .ctl_name = NET_IPV4_IGMP_MAX_MEMBERSHIPS,
545 .procname = "igmp_max_memberships",
546 .data = &sysctl_igmp_max_memberships,
547 .maxlen = sizeof(int),
549 .proc_handler = &proc_dointvec
554 .ctl_name = NET_IPV4_IGMP_MAX_MSF,
555 .procname = "igmp_max_msf",
556 .data = &sysctl_igmp_max_msf,
557 .maxlen = sizeof(int),
559 .proc_handler = &proc_dointvec
562 .ctl_name = NET_IPV4_INET_PEER_THRESHOLD,
563 .procname = "inet_peer_threshold",
564 .data = &inet_peer_threshold,
565 .maxlen = sizeof(int),
567 .proc_handler = &proc_dointvec
570 .ctl_name = NET_IPV4_INET_PEER_MINTTL,
571 .procname = "inet_peer_minttl",
572 .data = &inet_peer_minttl,
573 .maxlen = sizeof(int),
575 .proc_handler = &proc_dointvec_jiffies,
576 .strategy = &sysctl_jiffies
579 .ctl_name = NET_IPV4_INET_PEER_MAXTTL,
580 .procname = "inet_peer_maxttl",
581 .data = &inet_peer_maxttl,
582 .maxlen = sizeof(int),
584 .proc_handler = &proc_dointvec_jiffies,
585 .strategy = &sysctl_jiffies
588 .ctl_name = NET_IPV4_INET_PEER_GC_MINTIME,
589 .procname = "inet_peer_gc_mintime",
590 .data = &inet_peer_gc_mintime,
591 .maxlen = sizeof(int),
593 .proc_handler = &proc_dointvec_jiffies,
594 .strategy = &sysctl_jiffies
597 .ctl_name = NET_IPV4_INET_PEER_GC_MAXTIME,
598 .procname = "inet_peer_gc_maxtime",
599 .data = &inet_peer_gc_maxtime,
600 .maxlen = sizeof(int),
602 .proc_handler = &proc_dointvec_jiffies,
603 .strategy = &sysctl_jiffies
606 .ctl_name = NET_TCP_ORPHAN_RETRIES,
607 .procname = "tcp_orphan_retries",
608 .data = &sysctl_tcp_orphan_retries,
609 .maxlen = sizeof(int),
611 .proc_handler = &proc_dointvec
614 .ctl_name = NET_TCP_FACK,
615 .procname = "tcp_fack",
616 .data = &sysctl_tcp_fack,
617 .maxlen = sizeof(int),
619 .proc_handler = &proc_dointvec
622 .ctl_name = NET_TCP_REORDERING,
623 .procname = "tcp_reordering",
624 .data = &sysctl_tcp_reordering,
625 .maxlen = sizeof(int),
627 .proc_handler = &proc_dointvec
630 .ctl_name = NET_TCP_ECN,
631 .procname = "tcp_ecn",
632 .data = &sysctl_tcp_ecn,
633 .maxlen = sizeof(int),
635 .proc_handler = &proc_dointvec
638 .ctl_name = NET_TCP_DSACK,
639 .procname = "tcp_dsack",
640 .data = &sysctl_tcp_dsack,
641 .maxlen = sizeof(int),
643 .proc_handler = &proc_dointvec
646 .ctl_name = NET_TCP_MEM,
647 .procname = "tcp_mem",
648 .data = &sysctl_tcp_mem,
649 .maxlen = sizeof(sysctl_tcp_mem),
651 .proc_handler = &proc_dointvec
654 .ctl_name = NET_TCP_WMEM,
655 .procname = "tcp_wmem",
656 .data = &sysctl_tcp_wmem,
657 .maxlen = sizeof(sysctl_tcp_wmem),
659 .proc_handler = &proc_dointvec
662 .ctl_name = NET_TCP_RMEM,
663 .procname = "tcp_rmem",
664 .data = &sysctl_tcp_rmem,
665 .maxlen = sizeof(sysctl_tcp_rmem),
667 .proc_handler = &proc_dointvec
670 .ctl_name = NET_TCP_APP_WIN,
671 .procname = "tcp_app_win",
672 .data = &sysctl_tcp_app_win,
673 .maxlen = sizeof(int),
675 .proc_handler = &proc_dointvec
678 .ctl_name = NET_TCP_ADV_WIN_SCALE,
679 .procname = "tcp_adv_win_scale",
680 .data = &sysctl_tcp_adv_win_scale,
681 .maxlen = sizeof(int),
683 .proc_handler = &proc_dointvec
686 .ctl_name = NET_IPV4_ICMP_RATELIMIT,
687 .procname = "icmp_ratelimit",
688 .data = &sysctl_icmp_ratelimit,
689 .maxlen = sizeof(int),
691 .proc_handler = &proc_dointvec
694 .ctl_name = NET_IPV4_ICMP_RATEMASK,
695 .procname = "icmp_ratemask",
696 .data = &sysctl_icmp_ratemask,
697 .maxlen = sizeof(int),
699 .proc_handler = &proc_dointvec
702 .ctl_name = NET_TCP_TW_REUSE,
703 .procname = "tcp_tw_reuse",
704 .data = &sysctl_tcp_tw_reuse,
705 .maxlen = sizeof(int),
707 .proc_handler = &proc_dointvec
710 .ctl_name = NET_TCP_FRTO,
711 .procname = "tcp_frto",
712 .data = &sysctl_tcp_frto,
713 .maxlen = sizeof(int),
715 .proc_handler = &proc_dointvec
718 .ctl_name = NET_TCP_FRTO_RESPONSE,
719 .procname = "tcp_frto_response",
720 .data = &sysctl_tcp_frto_response,
721 .maxlen = sizeof(int),
723 .proc_handler = &proc_dointvec
726 .ctl_name = NET_TCP_LOW_LATENCY,
727 .procname = "tcp_low_latency",
728 .data = &sysctl_tcp_low_latency,
729 .maxlen = sizeof(int),
731 .proc_handler = &proc_dointvec
734 .ctl_name = NET_IPV4_IPFRAG_SECRET_INTERVAL,
735 .procname = "ipfrag_secret_interval",
736 .data = &ip4_frags_ctl.secret_interval,
737 .maxlen = sizeof(int),
739 .proc_handler = &proc_dointvec_jiffies,
740 .strategy = &sysctl_jiffies
743 .procname = "ipfrag_max_dist",
744 .data = &sysctl_ipfrag_max_dist,
745 .maxlen = sizeof(int),
747 .proc_handler = &proc_dointvec_minmax,
751 .ctl_name = NET_TCP_NO_METRICS_SAVE,
752 .procname = "tcp_no_metrics_save",
753 .data = &sysctl_tcp_nometrics_save,
754 .maxlen = sizeof(int),
756 .proc_handler = &proc_dointvec,
759 .ctl_name = NET_TCP_MODERATE_RCVBUF,
760 .procname = "tcp_moderate_rcvbuf",
761 .data = &sysctl_tcp_moderate_rcvbuf,
762 .maxlen = sizeof(int),
764 .proc_handler = &proc_dointvec,
767 .ctl_name = NET_TCP_TSO_WIN_DIVISOR,
768 .procname = "tcp_tso_win_divisor",
769 .data = &sysctl_tcp_tso_win_divisor,
770 .maxlen = sizeof(int),
772 .proc_handler = &proc_dointvec,
775 .ctl_name = NET_TCP_CONG_CONTROL,
776 .procname = "tcp_congestion_control",
778 .maxlen = TCP_CA_NAME_MAX,
779 .proc_handler = &proc_tcp_congestion_control,
780 .strategy = &sysctl_tcp_congestion_control,
783 .ctl_name = NET_TCP_ABC,
784 .procname = "tcp_abc",
785 .data = &sysctl_tcp_abc,
786 .maxlen = sizeof(int),
788 .proc_handler = &proc_dointvec,
791 .ctl_name = NET_TCP_MTU_PROBING,
792 .procname = "tcp_mtu_probing",
793 .data = &sysctl_tcp_mtu_probing,
794 .maxlen = sizeof(int),
796 .proc_handler = &proc_dointvec,
799 .ctl_name = NET_TCP_BASE_MSS,
800 .procname = "tcp_base_mss",
801 .data = &sysctl_tcp_base_mss,
802 .maxlen = sizeof(int),
804 .proc_handler = &proc_dointvec,
807 .ctl_name = NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS,
808 .procname = "tcp_workaround_signed_windows",
809 .data = &sysctl_tcp_workaround_signed_windows,
810 .maxlen = sizeof(int),
812 .proc_handler = &proc_dointvec
814 #ifdef CONFIG_NET_DMA
816 .ctl_name = NET_TCP_DMA_COPYBREAK,
817 .procname = "tcp_dma_copybreak",
818 .data = &sysctl_tcp_dma_copybreak,
819 .maxlen = sizeof(int),
821 .proc_handler = &proc_dointvec
825 .ctl_name = NET_TCP_SLOW_START_AFTER_IDLE,
826 .procname = "tcp_slow_start_after_idle",
827 .data = &sysctl_tcp_slow_start_after_idle,
828 .maxlen = sizeof(int),
830 .proc_handler = &proc_dointvec
832 #ifdef CONFIG_NETLABEL
834 .ctl_name = NET_CIPSOV4_CACHE_ENABLE,
835 .procname = "cipso_cache_enable",
836 .data = &cipso_v4_cache_enabled,
837 .maxlen = sizeof(int),
839 .proc_handler = &proc_dointvec,
842 .ctl_name = NET_CIPSOV4_CACHE_BUCKET_SIZE,
843 .procname = "cipso_cache_bucket_size",
844 .data = &cipso_v4_cache_bucketsize,
845 .maxlen = sizeof(int),
847 .proc_handler = &proc_dointvec,
850 .ctl_name = NET_CIPSOV4_RBM_OPTFMT,
851 .procname = "cipso_rbm_optfmt",
852 .data = &cipso_v4_rbm_optfmt,
853 .maxlen = sizeof(int),
855 .proc_handler = &proc_dointvec,
858 .ctl_name = NET_CIPSOV4_RBM_STRICTVALID,
859 .procname = "cipso_rbm_strictvalid",
860 .data = &cipso_v4_rbm_strictvalid,
861 .maxlen = sizeof(int),
863 .proc_handler = &proc_dointvec,
865 #endif /* CONFIG_NETLABEL */
867 .procname = "tcp_available_congestion_control",
868 .maxlen = TCP_CA_BUF_MAX,
870 .proc_handler = &proc_tcp_available_congestion_control,
873 .ctl_name = NET_TCP_ALLOWED_CONG_CONTROL,
874 .procname = "tcp_allowed_congestion_control",
875 .maxlen = TCP_CA_BUF_MAX,
877 .proc_handler = &proc_allowed_congestion_control,
878 .strategy = &strategy_allowed_congestion_control,
881 .ctl_name = NET_TCP_MAX_SSTHRESH,
882 .procname = "tcp_max_ssthresh",
883 .data = &sysctl_tcp_max_ssthresh,
884 .maxlen = sizeof(int),
886 .proc_handler = &proc_dointvec,
891 #endif /* CONFIG_SYSCTL */
893 EXPORT_SYMBOL(ipv4_config);