diff options
-rw-r--r-- | sys/netinet/tcp_output.c | 13 | ||||
-rw-r--r-- | sys/netinet/tcp_timer.c | 4 |
2 files changed, 10 insertions, 7 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 63d9bd94111..d7ef45444f4 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.34 2000/09/25 09:41:03 provos Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.35 2001/05/31 16:27:08 provos Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -343,15 +343,18 @@ again: * but we haven't been called to retransmit, * len will be -1. Otherwise, window shrank * after we sent into it. If window shrank to 0, - * cancel pending retransmit and pull snd_nxt - * back to (closed) window. We will enter persist - * state below. If the window didn't close completely, - * just wait for an ACK. + * cancel pending retransmit, pull snd_nxt back + * to (closed) window, and set the persist timer + * if it isn't already going. If the window didn't + * close completely, just wait for an ACK. */ len = 0; if (win == 0) { tp->t_timer[TCPT_REXMT] = 0; + tp->t_rxtshift = 0; tp->snd_nxt = tp->snd_una; + if (tp->t_timer[TCPT_PERSIST] == 0) + tcp_setpersist(tp); } } if (len > tp->t_maxseg) { diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 4c300249da9..cfa6857a7b4 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_timer.c,v 1.20 2000/12/13 09:47:08 provos Exp $ */ +/* $OpenBSD: tcp_timer.c,v 1.21 2001/05/31 16:27:08 provos Exp $ */ /* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */ /* @@ -390,7 +390,7 @@ tcp_timers(tp, timer) if (TCPS_HAVEESTABLISHED(tp->t_state) == 0) goto dropit; if (tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE && - tp->t_state <= TCPS_CLOSE_WAIT) { + tp->t_state <= TCPS_CLOSING) { if (tp->t_idle >= tcp_keepidle + tcp_maxidle) goto dropit; /* |