From 68494a1c586f98ca697a91771fddff329f1dcf14 Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Wed, 6 Jul 2011 23:44:21 +0000 Subject: Add sysctl net.inet.tcp.always_keepalive, when this is set the system behaves as if SO_KEEPALIVE was set on all TCP sockets, forcing keepalives to be sent every net.inet.tcp.keepidle half-seconds. In conjunction with a keepidle value greatly reduced from the default, this can be useful for keeping sessions open if you are stuck on a network with short NAT or firewall timeouts. Feedback from various people, ok henning@ claudio@ --- lib/libc/gen/sysctl.3 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3 index 5fd5f847fee..fd04ac0dbfc 100644 --- a/lib/libc/gen/sysctl.3 +++ b/lib/libc/gen/sysctl.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sysctl.3,v 1.203 2011/06/27 17:43:03 naddy Exp $ +.\" $OpenBSD: sysctl.3,v 1.204 2011/07/06 23:44:20 sthen Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: June 27 2011 $ +.Dd $Mdocdate: July 6 2011 $ .Dt SYSCTL 3 .Os .Sh NAME @@ -1575,6 +1575,10 @@ Time to keep alive the initial SYN packet of a TCP handshake. Time after a keepalive probe is sent until, in the absence of any response, another probe is sent. See also tcp.slowhz. +.It Li tcp.always_keepalive +Act as if the option +.Dv SO_KEEPALIVE +was set on all TCP sockets. .It Li tcp.mssdflt The maximum segment size that is used as default for non-local connections. The default value is 512. -- cgit v1.2.3