Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Aug 2020 22:39:07 +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: r364579 - stable/12/sys/netinet
Message-ID:  <202008232239.07NMd77j005598@repo.freebsd.org>

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

Log:
  MFC r360662:
  Fix the computation of the numbers of entries of the mapping array to
  look at when generating a SACK. This was wrong in case of sequence
  numbers wrap arounds.
  
  Thanks to Gwenael FOURRE for reporting the issue for the userland stack:
  https://github.com/sctplab/usrsctp/issues/462

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

Modified: stable/12/sys/netinet/sctp_output.c
==============================================================================
--- stable/12/sys/netinet/sctp_output.c	Sun Aug 23 22:35:52 2020	(r364578)
+++ stable/12/sys/netinet/sctp_output.c	Sun Aug 23 22:39:06 2020	(r364579)
@@ -10719,7 +10719,7 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked
 		if (highest_tsn > asoc->mapping_array_base_tsn) {
 			siz = (((highest_tsn - asoc->mapping_array_base_tsn) + 1) + 7) / 8;
 		} else {
-			siz = (((MAX_TSN - highest_tsn) + 1) + highest_tsn + 7) / 8;
+			siz = (((MAX_TSN - asoc->mapping_array_base_tsn) + 1) + highest_tsn + 7) / 8;
 		}
 	} else {
 		sack = NULL;



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