diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1996-04-04 11:17:04 +0000 | 
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1996-04-04 11:17:04 +0000 | 
| commit | 34be9bf3ce4a76d2671b93b52a04cc4a3d3b40d4 (patch) | |
| tree | fda454e760993a83660c9825d732e2aed6a6da3a /sys/netinet/tcp_timer.c | |
| parent | 816a3d836e7af6e199987eabb361386ebfcd739b (diff) | |
Notes
Diffstat (limited to 'sys/netinet/tcp_timer.c')
| -rw-r--r-- | sys/netinet/tcp_timer.c | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 66691eacf43c..f9c89b7b6f97 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -31,7 +31,7 @@   * SUCH DAMAGE.   *   *	@(#)tcp_timer.c	8.2 (Berkeley) 5/24/95 - *	$Id: tcp_timer.c,v 1.13 1996/01/04 21:34:21 olah Exp $ + *	$Id: tcp_timer.c,v 1.14 1996/03/11 15:13:35 davidg Exp $   */  #ifndef TUBA_INCLUDE @@ -72,6 +72,10 @@ static int	tcp_keepintvl = TCPTV_KEEPINTVL;  SYSCTL_INT(_net_inet_tcp, TCPCTL_KEEPINTVL, keepintvl,  	CTLFLAG_RW, &tcp_keepintvl , 0, ""); +static int	always_keepalive = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, always_keepalive, +	CTLFLAG_RW, &always_keepalive , 0, ""); +  static int	tcp_keepcnt = TCPTV_KEEPCNT;  	/* max idle probes */  static int	tcp_maxpersistidle = TCPTV_KEEP_IDLE; @@ -314,7 +318,8 @@ tcp_timers(tp, timer)  		tcpstat.tcps_keeptimeo++;  		if (tp->t_state < TCPS_ESTABLISHED)  			goto dropit; -		if (tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE && +		if ((always_keepalive || +		    tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE) &&  		    tp->t_state <= TCPS_CLOSE_WAIT) {  		    	if (tp->t_idle >= tcp_keepidle + tcp_maxidle)  				goto dropit;  | 
