summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1996-06-04 23:34:06 +0000
committerJohn Polstra <jdp@FreeBSD.org>1996-06-04 23:34:06 +0000
commit885f2f31b4599f4bc7468278c783c1c30f1f86ed (patch)
treef8f7bcdb2defccd6cd9f66b90e0b1a85774b0a7e
parent5baa9b6d142e52d1469ce71ee622cbe1787b6703 (diff)
Notes
-rw-r--r--sys/netinet/tcp_timer.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index b5ac3f36f6c9..c1978dbdceab 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_timer.c 8.1 (Berkeley) 6/10/93
- * $Id: tcp_timer.c,v 1.7.4.1 1995/07/29 23:16:52 davidg Exp $
+ * $Id: tcp_timer.c,v 1.7.4.2 1996/04/15 03:49:53 davidg Exp $
*/
#ifndef TUBA_INCLUDE
@@ -275,12 +275,17 @@ tcp_timers(tp, timer)
* (no responses to probes) reaches the maximum
* backoff that we would use if retransmitting.
*/
- if (tp->t_rxtshift == TCP_MAXRXTSHIFT &&
- (tp->t_idle >= tcp_maxpersistidle ||
- tp->t_idle >= TCP_REXMTVAL(tp) * tcp_totbackoff)) {
- tcpstat.tcps_persistdrop++;
- tp = tcp_drop(tp, ETIMEDOUT);
- break;
+ if (tp->t_rxtshift == TCP_MAXRXTSHIFT) {
+ u_long maxidle = TCP_REXMTVAL(tp);
+ if (maxidle < tp->t_rttmin)
+ maxidle = tp->t_rttmin;
+ maxidle *= tcp_totbackoff;
+ if (tp->t_idle >= tcp_maxpersistidle ||
+ tp->t_idle >= maxidle) {
+ tcpstat.tcps_persistdrop++;
+ tp = tcp_drop(tp, ETIMEDOUT);
+ break;
+ }
}
tcp_setpersist(tp);
tp->t_force = 1;