summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorhugh <hugh@openbsd.org>1999-11-15 05:50:59 +0000
committerhugh <hugh@openbsd.org>1999-11-15 05:50:59 +0000
commit20014d98fec8e465734b37b00b8822a6f58786e3 (patch)
tree366eb1c42e54e1a8a6b15ad5add03f9410b05499 /sys/netinet/tcp_output.c
parentConsistify DHCP man page titles somewhat; d@, sebastion@irelandmail.com (diff)
downloadwireguard-openbsd-20014d98fec8e465734b37b00b8822a6f58786e3.tar.xz
wireguard-openbsd-20014d98fec8e465734b37b00b8822a6f58786e3.zip
Fix tcp retransmit/persist timers, provos@ OK.
Adapted from NetBSD: Fix a retransmission bug introduced by the Brakmo and Peterson RTO estimation changes. Under some circumstances it would return a value of 0, while the old Van Jacobson RTO code would return a minimum of 3. This would result in 12 retransmissions, each 1 second apart. This takes care of those instances, and ensures that t_rttmin is used everywhere as a lower bound.
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 5324d78f931..b204dfe9b50 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.22 1999/11/04 11:24:24 ho Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.23 1999/11/15 05:50:59 hugh Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -1077,6 +1077,8 @@ tcp_setpersist(tp)
/*
* Start/restart persistance timer.
*/
+ if (t < tp->t_rttmin)
+ t = tp->t_rttmin;
TCPT_RANGESET(tp->t_timer[TCPT_PERSIST],
t * tcp_backoff[tp->t_rxtshift],
TCPTV_PERSMIN, TCPTV_PERSMAX);