Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2020 20:14:35 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r361474 - stable/11/sys/netinet
Message-ID:  <202005252014.04PKEZ86025612@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Mon May 25 20:14:34 2020
New Revision: 361474
URL: https://svnweb.freebsd.org/changeset/base/361474

Log:
  MFC r361214: Correctly ignore impossible RTT measurements
  
  Fix logical condition by looking at usecs.
  
  This issue was found by cpp-check running on the userland stack.

Modified:
  stable/11/sys/netinet/sctputil.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/sctputil.c
==============================================================================
--- stable/11/sys/netinet/sctputil.c	Mon May 25 20:11:26 2020	(r361473)
+++ stable/11/sys/netinet/sctputil.c	Mon May 25 20:14:34 2020	(r361474)
@@ -2555,7 +2555,7 @@ sctp_calculate_rto(struct sctp_tcb *stcb,
 		(void)SCTP_GETTIME_TIMEVAL(&now);
 	}
 	if ((old->tv_sec > now.tv_sec) ||
-	    ((old->tv_sec == now.tv_sec) && (old->tv_sec > now.tv_sec))) {
+	    ((old->tv_sec == now.tv_sec) && (old->tv_usec > now.tv_usec))) {
 		/* The starting point is in the future. */
 		return (0);
 	}



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