Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Aug 2020 23:08:55 +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-12@freebsd.org
Subject:   svn commit: r364587 - stable/12/sys/netinet
Message-ID:  <202008232308.07NN8tig024373@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Aug 23 23:08:55 2020
New Revision: 364587
URL: https://svnweb.freebsd.org/changeset/base/364587

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

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

Modified: stable/12/sys/netinet/sctputil.c
==============================================================================
--- stable/12/sys/netinet/sctputil.c	Sun Aug 23 23:02:51 2020	(r364586)
+++ stable/12/sys/netinet/sctputil.c	Sun Aug 23 23:08:55 2020	(r364587)
@@ -2928,7 +2928,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?202008232308.07NN8tig024373>