diff options
author | 1996-09-12 06:19:56 +0000 | |
---|---|---|
committer | 1996-09-12 06:19:56 +0000 | |
commit | db011c5bc0920cb435c571d01c766f4612755593 (patch) | |
tree | 56a596733e9c96928f9c57a689234928293c1e9a /sys/netinet/tcp_output.c | |
parent | Don't assume other subnets than our own are local to us; from Luigi Rizzo (diff) | |
download | wireguard-openbsd-db011c5bc0920cb435c571d01c766f4612755593.tar.xz wireguard-openbsd-db011c5bc0920cb435c571d01c766f4612755593.zip |
TCP Persist handling; from 4.4BSD Lite2 (via NetBSD PR 2335)
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r-- | sys/netinet/tcp_output.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 600f6bad8d5..d4192defcd5 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.3 1996/03/14 08:06:57 tholo Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.4 1996/09/12 06:19:56 tholo Exp $ */ /* $NetBSD: tcp_output.c,v 1.14 1996/02/13 23:43:53 christos Exp $ */ /* @@ -154,15 +154,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. + * calcel pending retransmit, pull snd_nxt back + * to (closed) window, and set the persist timer + * if it isn't already running. 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) { |