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