Author: tuexen
Date: Thu May  7 03:48:59 2020
New Revision: 360771
URL: https://svnweb.freebsd.org/changeset/base/360771

Log:
  MFC r360662: Fix a bug in SCTP SACK generation
  
  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/11/sys/netinet/sctp_output.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/sctp_output.c
==============================================================================
--- stable/11/sys/netinet/sctp_output.c Thu May  7 03:44:35 2020        
(r360770)
+++ stable/11/sys/netinet/sctp_output.c Thu May  7 03:48:59 2020        
(r360771)
@@ -10713,7 +10713,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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to