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