From dc9378460c96e0415824f585ee9b5d120e06ec23 Mon Sep 17 00:00:00 2001 From: christos Date: Tue, 30 Mar 2004 19:58:14 +0000 Subject: [PATCH] Make sure we disarm the persist timer before we arm the rexmit timer, otherwise there is a tiny window where both timers are active, and this is not correct according to the comments in the code. I believe that this is the cause of the to_ticks <= 0 assertion failure in callout_schedule() that I've been getting. --- sys/netinet/tcp_output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 27fd1906c118..e25528f38dc5 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_output.c,v 1.108 2004/03/03 05:59:38 thorpej Exp $ */ +/* $NetBSD: tcp_output.c,v 1.109 2004/03/30 19:58:14 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -138,7 +138,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.108 2004/03/03 05:59:38 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.109 2004/03/30 19:58:14 christos Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -1116,11 +1116,11 @@ send: */ if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 && tp->snd_nxt != tp->snd_una) { - TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur); if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) { TCP_TIMER_DISARM(tp, TCPT_PERSIST); tp->t_rxtshift = 0; } + TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur); } } else if (SEQ_GT(tp->snd_nxt + len, tp->snd_max))