summaryrefslogtreecommitdiffstats
path: root/net/ipv4/sysctl_net_ipv4.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
commitd6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch)
treee2be02f33984c48ec019c654051d27964e42c441 /net/ipv4/sysctl_net_ipv4.c
parent609d1e803baf519487233b765eb487f9ec227a18 (diff)
Merge with 2.3.19.
Diffstat (limited to 'net/ipv4/sysctl_net_ipv4.c')
-rw-r--r--net/ipv4/sysctl_net_ipv4.c42
1 files changed, 29 insertions, 13 deletions
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,11 +160,15 @@ 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},
{NET_TCP_RFC1337, "tcp_rfc1337", &sysctl_tcp_rfc1337,