summaryrefslogtreecommitdiffstats
path: root/etc/rc.network
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-06-05 05:45:57 +0000
committerphk <phk@FreeBSD.org>1999-06-05 05:45:57 +0000
commit47e8c0df80372b7e332c2917c46155e79ace4a7f (patch)
tree9dd464ed6a1f446e88c62be5ca11a9046f93b487 /etc/rc.network
parent21732dea0c4943518e727150906d9117775a8a6b (diff)
downloadFreeBSD-src-47e8c0df80372b7e332c2917c46155e79ace4a7f.zip
FreeBSD-src-47e8c0df80372b7e332c2917c46155e79ace4a7f.tar.gz
Add handle to control global TCP keepalives and turn them on as
default. Despite their name it doesn't keep TCP sessions alive, it kills them if the other end has gone AWOL. This happens a lot with clients which use NAT, dynamic IP assignment or which has a 2^32 * 10^-3 seconds upper bound on their uptime. There is no detectable increase in network trafic because of this: two minimal TCP packets every two hours for a live TCP connection. Many servers already enable keepalives themselves. The host requirements RFC is 10 years old, and doesn't know about the loosing clients of todays InterNet.
Diffstat (limited to 'etc/rc.network')
-rw-r--r--etc/rc.network7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/rc.network b/etc/rc.network
index a10e8fd..ef6bc08 100644
--- a/etc/rc.network
+++ b/etc/rc.network
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.network,v 1.43 1999/04/10 10:56:58 des Exp $
+# $Id: rc.network,v 1.44 1999/04/12 15:26:41 brian Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@@ -180,6 +180,11 @@ network_pass1() {
sysctl -w net.inet.ip.accept_sourceroute=1 >/dev/null 2>&1
fi
+ if [ "X$tcp_keepalive" = X"YES" ]; then
+ echo -n ' TCP keepalive=YES'
+ sysctl -w net.inet.tcp.always_keepalive=1 >/dev/null 2>&1
+ fi
+
if [ "X$ipxgateway_enable" = X"YES" ]; then
echo -n ' IPX gateway=YES'
sysctl -w net.ipx.ipx.ipxforwarding=1 >/dev/null 2>&1
OpenPOWER on IntegriCloud