From d6434e1042f3b0a6dfe1b1f615af369486f9b1fa Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 9 Oct 1999 00:00:47 +0000 Subject: Merge with 2.3.19. --- net/ipv4/sysctl_net_ipv4.c | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) (limited to 'net/ipv4/sysctl_net_ipv4.c') diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 10f5e9324..1ff1566af 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4/sysctl_net_ipv4.c @@ -1,7 +1,7 @@ /* * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem. * - * $Id: sysctl_net_ipv4.c,v 1.38 1999/01/02 16:51:48 davem Exp $ + * $Id: sysctl_net_ipv4.c,v 1.40 1999/09/07 02:31:17 davem Exp $ * * Begun April 1, 1996, Mike Shaver. * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS] @@ -50,7 +50,6 @@ extern int sysctl_tcp_sack; extern int sysctl_tcp_retrans_collapse; extern int sysctl_tcp_keepalive_time; extern int sysctl_tcp_keepalive_probes; -extern int sysctl_tcp_max_ka_probes; extern int sysctl_tcp_retries1; extern int sysctl_tcp_retries2; extern int sysctl_tcp_fin_timeout; @@ -60,6 +59,7 @@ extern int sysctl_tcp_stdurg; extern int sysctl_tcp_rfc1337; extern int sysctl_tcp_syn_taildrop; extern int sysctl_max_syn_backlog; +extern int sysctl_tcp_tw_recycle; /* From icmp.c */ extern int sysctl_icmp_destunreach_time; @@ -90,9 +90,23 @@ int ipv4_sysctl_forward(ctl_table *ctl, int write, struct file * filp, if (write && ipv4_devconf.forwarding != val) inet_forward_change(); - return ret; + return ret; } +static int ipv4_sysctl_forward_strategy(ctl_table *table, int *name, int nlen, + void *oldval, size_t *oldlenp, + void *newval, size_t newlen, + void **context) +{ + int new; + if (newlen != sizeof(int)) + return -EINVAL; + if (get_user(new,(int *)newval)) + return -EFAULT; + if (new != ipv4_devconf.forwarding) + inet_forward_change(); + return 0; /* caller does change again and handles handles oldval */ +} ctl_table ipv4_table[] = { {NET_IPV4_TCP_TIMESTAMPS, "tcp_timestamps", @@ -109,7 +123,7 @@ ctl_table ipv4_table[] = { &proc_dointvec}, {NET_IPV4_FORWARD, "ip_forward", &ipv4_devconf.forwarding, sizeof(int), 0644, NULL, - &ipv4_sysctl_forward}, + &ipv4_sysctl_forward,&ipv4_sysctl_forward_strategy}, {NET_IPV4_DEFAULT_TTL, "ip_default_ttl", &ip_statistics.IpDefaultTTL, sizeof(int), 0644, NULL, &proc_dointvec}, @@ -127,20 +141,18 @@ ctl_table ipv4_table[] = { &sysctl_ipfrag_low_thresh, sizeof(int), 0644, NULL, &proc_dointvec}, {NET_IPV4_DYNADDR, "ip_dynaddr", &sysctl_ip_dynaddr, sizeof(int), 0644, NULL, &proc_dointvec}, -#ifdef CONFIG_IP_MASQUERADE - {NET_IPV4_IP_MASQ_DEBUG, "ip_masq_debug", - &sysctl_ip_masq_debug, sizeof(int), 0644, NULL, &proc_dointvec}, -#endif {NET_IPV4_IPFRAG_TIME, "ipfrag_time", - &sysctl_ipfrag_time, sizeof(int), 0644, NULL, &proc_dointvec_jiffies}, - {NET_IPV4_TCP_MAX_KA_PROBES, "tcp_max_ka_probes", - &sysctl_tcp_max_ka_probes, sizeof(int), 0644, NULL, &proc_dointvec}, + &sysctl_ipfrag_time, sizeof(int), 0644, NULL, &proc_dointvec_jiffies, + &sysctl_jiffies}, {NET_IPV4_TCP_KEEPALIVE_TIME, "tcp_keepalive_time", &sysctl_tcp_keepalive_time, sizeof(int), 0644, NULL, - &proc_dointvec_jiffies}, + &proc_dointvec_jiffies, &sysctl_jiffies}, {NET_IPV4_TCP_KEEPALIVE_PROBES, "tcp_keepalive_probes", &sysctl_tcp_keepalive_probes, sizeof(int), 0644, NULL, &proc_dointvec}, + {NET_IPV4_TCP_KEEPALIVE_INTVL, "tcp_keepalive_intvl", + &sysctl_tcp_keepalive_intvl, sizeof(int), 0644, NULL, + &proc_dointvec_jiffies, &sysctl_jiffies}, {NET_IPV4_TCP_RETRIES1, "tcp_retries1", &sysctl_tcp_retries1, sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL, NULL, &tcp_retr1_max}, @@ -148,10 +160,14 @@ ctl_table ipv4_table[] = { &sysctl_tcp_retries2, sizeof(int), 0644, NULL, &proc_dointvec}, {NET_IPV4_TCP_FIN_TIMEOUT, "tcp_fin_timeout", &sysctl_tcp_fin_timeout, sizeof(int), 0644, NULL, - &proc_dointvec_jiffies}, + &proc_dointvec_jiffies, &sysctl_jiffies}, #ifdef CONFIG_SYN_COOKIES {NET_TCP_SYNCOOKIES, "tcp_syncookies", &sysctl_tcp_syncookies, sizeof(int), 0644, NULL, &proc_dointvec}, +#endif +#ifdef CONFIG_TCP_TW_RECYCLE + {NET_TCP_TW_RECYCLE, "tcp_tw_recycle", + &sysctl_tcp_tw_recycle, sizeof(int), 0644, NULL, &proc_dointvec}, #endif {NET_TCP_STDURG, "tcp_stdurg", &sysctl_tcp_stdurg, sizeof(int), 0644, NULL, &proc_dointvec}, -- cgit v1.2.3