Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2020 15:02:15 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361214 - head/sys/netinet
Message-ID:  <202005181502.04IF2F7V072442@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Mon May 18 15:02:15 2020
New Revision: 361214
URL: https://svnweb.freebsd.org/changeset/base/361214

Log:
  Fix logical condition by looking at usecs.
  
  This issue was found by cpp-check running on the userland stack.
  
  MFC after:		3 days

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c	Mon May 18 15:00:18 2020	(r361213)
+++ head/sys/netinet/sctputil.c	Mon May 18 15:02:15 2020	(r361214)
@@ -2933,7 +2933,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?202005181502.04IF2F7V072442>