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