Merge branch 'master' into upstream
[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/igmp.h>
14 #include <linux/inetdevice.h>
15 #include <net/snmp.h>
16 #include <net/icmp.h>
17 #include <net/ip.h>
18 #include <net/route.h>
19 #include <net/tcp.h>
20 #include <net/cipso_ipv4.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 static int __init tcp_congestion_default(void)
133 {
134         return tcp_set_default_congestion_control(CONFIG_DEFAULT_TCP_CONG);
135 }
136
137 late_initcall(tcp_congestion_default);
138
139 ctl_table ipv4_table[] = {
140         {
141                 .ctl_name       = NET_IPV4_TCP_TIMESTAMPS,
142                 .procname       = "tcp_timestamps",
143                 .data           = &sysctl_tcp_timestamps,
144                 .maxlen         = sizeof(int),
145                 .mode           = 0644,
146                 .proc_handler   = &proc_dointvec
147         },
148         {
149                 .ctl_name       = NET_IPV4_TCP_WINDOW_SCALING,
150                 .procname       = "tcp_window_scaling",
151                 .data           = &sysctl_tcp_window_scaling,
152                 .maxlen         = sizeof(int),
153                 .mode           = 0644,
154                 .proc_handler   = &proc_dointvec
155         },
156         {
157                 .ctl_name       = NET_IPV4_TCP_SACK,
158                 .procname       = "tcp_sack",
159                 .data           = &sysctl_tcp_sack,
160                 .maxlen         = sizeof(int),
161                 .mode           = 0644,
162                 .proc_handler   = &proc_dointvec
163         },
164         {
165                 .ctl_name       = NET_IPV4_TCP_RETRANS_COLLAPSE,
166                 .procname       = "tcp_retrans_collapse",
167                 .data           = &sysctl_tcp_retrans_collapse,
168                 .maxlen         = sizeof(int),
169                 .mode           = 0644,
170                 .proc_handler   = &proc_dointvec
171         },
172         {
173                 .ctl_name       = NET_IPV4_FORWARD,
174                 .procname       = "ip_forward",
175                 .data           = &ipv4_devconf.forwarding,
176                 .maxlen         = sizeof(int),
177                 .mode           = 0644,
178                 .proc_handler   = &ipv4_sysctl_forward,
179                 .strategy       = &ipv4_sysctl_forward_strategy
180         },
181         {
182                 .ctl_name       = NET_IPV4_DEFAULT_TTL,
183                 .procname       = "ip_default_ttl",
184                 .data           = &sysctl_ip_default_ttl,
185                 .maxlen         = sizeof(int),
186                 .mode           = 0644,
187                 .proc_handler   = &ipv4_doint_and_flush,
188                 .strategy       = &ipv4_doint_and_flush_strategy,
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",
233                 .data           = &tcp_death_row.sysctl_max_tw_buckets,
234                 .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",
337                 .data           = &tcp_death_row.sysctl_tw_recycle,
338                 .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         {
410                 .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         {
418                 .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_IPV4_IPFRAG_MAX_DIST,
618                 .procname       = "ipfrag_max_dist",
619                 .data           = &sysctl_ipfrag_max_dist,
620                 .maxlen         = sizeof(int),
621                 .mode           = 0644,
622                 .proc_handler   = &proc_dointvec_minmax,
623                 .extra1         = &zero
624         },
625         {
626                 .ctl_name       = NET_TCP_NO_METRICS_SAVE,
627                 .procname       = "tcp_no_metrics_save",
628                 .data           = &sysctl_tcp_nometrics_save,
629                 .maxlen         = sizeof(int),
630                 .mode           = 0644,
631                 .proc_handler   = &proc_dointvec,
632         },
633         {
634                 .ctl_name       = NET_TCP_MODERATE_RCVBUF,
635                 .procname       = "tcp_moderate_rcvbuf",
636                 .data           = &sysctl_tcp_moderate_rcvbuf,
637                 .maxlen         = sizeof(int),
638                 .mode           = 0644,
639                 .proc_handler   = &proc_dointvec,
640         },
641         {
642                 .ctl_name       = NET_TCP_TSO_WIN_DIVISOR,
643                 .procname       = "tcp_tso_win_divisor",
644                 .data           = &sysctl_tcp_tso_win_divisor,
645                 .maxlen         = sizeof(int),
646                 .mode           = 0644,
647                 .proc_handler   = &proc_dointvec,
648         },
649         {
650                 .ctl_name       = NET_TCP_CONG_CONTROL,
651                 .procname       = "tcp_congestion_control",
652                 .mode           = 0644,
653                 .maxlen         = TCP_CA_NAME_MAX,
654                 .proc_handler   = &proc_tcp_congestion_control,
655                 .strategy       = &sysctl_tcp_congestion_control,
656         },
657         {
658                 .ctl_name       = NET_TCP_ABC,
659                 .procname       = "tcp_abc",
660                 .data           = &sysctl_tcp_abc,
661                 .maxlen         = sizeof(int),
662                 .mode           = 0644,
663                 .proc_handler   = &proc_dointvec,
664         },
665         {
666                 .ctl_name       = NET_TCP_MTU_PROBING,
667                 .procname       = "tcp_mtu_probing",
668                 .data           = &sysctl_tcp_mtu_probing,
669                 .maxlen         = sizeof(int),
670                 .mode           = 0644,
671                 .proc_handler   = &proc_dointvec,
672         },
673         {
674                 .ctl_name       = NET_TCP_BASE_MSS,
675                 .procname       = "tcp_base_mss",
676                 .data           = &sysctl_tcp_base_mss,
677                 .maxlen         = sizeof(int),
678                 .mode           = 0644,
679                 .proc_handler   = &proc_dointvec,
680         },
681         {
682                 .ctl_name       = NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS,
683                 .procname       = "tcp_workaround_signed_windows",
684                 .data           = &sysctl_tcp_workaround_signed_windows,
685                 .maxlen         = sizeof(int),
686                 .mode           = 0644,
687                 .proc_handler   = &proc_dointvec
688         },
689 #ifdef CONFIG_NET_DMA
690         {
691                 .ctl_name       = NET_TCP_DMA_COPYBREAK,
692                 .procname       = "tcp_dma_copybreak",
693                 .data           = &sysctl_tcp_dma_copybreak,
694                 .maxlen         = sizeof(int),
695                 .mode           = 0644,
696                 .proc_handler   = &proc_dointvec
697         },
698 #endif
699         {
700                 .ctl_name       = NET_TCP_SLOW_START_AFTER_IDLE,
701                 .procname       = "tcp_slow_start_after_idle",
702                 .data           = &sysctl_tcp_slow_start_after_idle,
703                 .maxlen         = sizeof(int),
704                 .mode           = 0644,
705                 .proc_handler   = &proc_dointvec
706         },
707 #ifdef CONFIG_NETLABEL
708         {
709                 .ctl_name       = NET_CIPSOV4_CACHE_ENABLE,
710                 .procname       = "cipso_cache_enable",
711                 .data           = &cipso_v4_cache_enabled,
712                 .maxlen         = sizeof(int),
713                 .mode           = 0644,
714                 .proc_handler   = &proc_dointvec,
715         },
716         {
717                 .ctl_name       = NET_CIPSOV4_CACHE_BUCKET_SIZE,
718                 .procname       = "cipso_cache_bucket_size",
719                 .data           = &cipso_v4_cache_bucketsize,
720                 .maxlen         = sizeof(int),
721                 .mode           = 0644,
722                 .proc_handler   = &proc_dointvec,
723         },
724         {
725                 .ctl_name       = NET_CIPSOV4_RBM_OPTFMT,
726                 .procname       = "cipso_rbm_optfmt",
727                 .data           = &cipso_v4_rbm_optfmt,
728                 .maxlen         = sizeof(int),
729                 .mode           = 0644,
730                 .proc_handler   = &proc_dointvec,
731         },
732         {
733                 .ctl_name       = NET_CIPSOV4_RBM_STRICTVALID,
734                 .procname       = "cipso_rbm_strictvalid",
735                 .data           = &cipso_v4_rbm_strictvalid,
736                 .maxlen         = sizeof(int),
737                 .mode           = 0644,
738                 .proc_handler   = &proc_dointvec,
739         },
740 #endif /* CONFIG_NETLABEL */
741         { .ctl_name = 0 }
742 };
743
744 #endif /* CONFIG_SYSCTL */
745
746 EXPORT_SYMBOL(ipv4_config);