Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Aug 2009 19:51:54 +0000 (UTC)
From:      Peter Wemm <peter@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
Subject:   svn commit: r196563 - stable/6/sys/netinet
Message-ID:  <200908261951.n7QJpsQo072186@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: peter
Date: Wed Aug 26 19:51:54 2009
New Revision: 196563
URL: http://svn.freebsd.org/changeset/base/196563

Log:
  MFC r194304: Fix ticks overflow in the handling of t_badtrxtwin.

Modified:
  stable/6/sys/netinet/tcp_input.c

Modified: stable/6/sys/netinet/tcp_input.c
==============================================================================
--- stable/6/sys/netinet/tcp_input.c	Wed Aug 26 19:50:27 2009	(r196562)
+++ stable/6/sys/netinet/tcp_input.c	Wed Aug 26 19:51:54 2009	(r196563)
@@ -1182,7 +1182,7 @@ after_listen:
 				 * "bad retransmit" recovery
 				 */
 				if (tp->t_rxtshift == 1 &&
-				    ticks < tp->t_badrxtwin) {
+				    (int)(ticks - tp->t_badrxtwin) < 0) {
 					++tcpstat.tcps_sndrexmitbad;
 					tp->snd_cwnd = tp->snd_cwnd_prev;
 					tp->snd_ssthresh =
@@ -2070,7 +2070,7 @@ process_ACK:
 		 * original cwnd and ssthresh, and proceed to transmit where
 		 * we left off.
 		 */
-		if (tp->t_rxtshift == 1 && ticks < tp->t_badrxtwin) {
+		if (tp->t_rxtshift == 1 && (int)(ticks - tp->t_badrxtwin) < 0) {
 			++tcpstat.tcps_sndrexmitbad;
 			tp->snd_cwnd = tp->snd_cwnd_prev;
 			tp->snd_ssthresh = tp->snd_ssthresh_prev;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908261951.n7QJpsQo072186>