svn commit: r196563 - stable/6/sys/netinet

Peter Wemm peter at FreeBSD.org
Wed Aug 26 19:51:55 UTC 2009


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;


More information about the svn-src-stable-6 mailing list