From 20014d98fec8e465734b37b00b8822a6f58786e3 Mon Sep 17 00:00:00 2001 From: hugh Date: Mon, 15 Nov 1999 05:50:59 +0000 Subject: 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. --- sys/netinet/tcp_output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/netinet/tcp_output.c') 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); -- cgit v1.2.3-59-g8ed1b