diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2011-07-06 23:44:21 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2011-07-06 23:44:21 +0000 |
commit | 68494a1c586f98ca697a91771fddff329f1dcf14 (patch) | |
tree | add29116d30508f173c5db57724b3e51943d22f7 /sys/netinet/tcp_var.h | |
parent | eec1e28e98046e35507e4a84c524322c3bce684c (diff) |
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@
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r-- | sys/netinet/tcp_var.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 0573c7d966b..7a61253231f 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_var.h,v 1.98 2011/01/07 17:50:42 bluhm Exp $ */ +/* $OpenBSD: tcp_var.h,v 1.99 2011/07/06 23:44:20 sthen Exp $ */ /* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */ /* @@ -473,7 +473,8 @@ struct tcpstat { #define TCPCTL_DROP 19 /* drop tcp connection */ #define TCPCTL_SACKHOLE_LIMIT 20 /* max entries for tcp sack queues */ #define TCPCTL_STATS 21 /* TCP statistics */ -#define TCPCTL_MAXID 22 +#define TCPCTL_ALWAYS_KEEPALIVE 22 /* assume SO_KEEPALIVE is always set */ +#define TCPCTL_MAXID 23 #define TCPCTL_NAMES { \ { 0, 0 }, \ @@ -497,7 +498,8 @@ struct tcpstat { { "reasslimit", CTLTYPE_INT }, \ { "drop", CTLTYPE_STRUCT }, \ { "sackholelimit", CTLTYPE_INT }, \ - { "stats", CTLTYPE_STRUCT } \ + { "stats", CTLTYPE_STRUCT }, \ + { "always_keepalive", CTLTYPE_INT } \ } #define TCPCTL_VARS { \ |