svn commit: r334286 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Mon May 28 13:31:48 UTC 2018


Author: tuexen
Date: Mon May 28 13:31:47 2018
New Revision: 334286
URL: https://svnweb.freebsd.org/changeset/base/334286

Log:
  Use correct mask.
  Introduced in https://svnweb.freebsd.org/changeset/base/333603.
  Thanks to Irene Ruengler for testing and reporting the issue.
  
  MFC after:		1 week
  X-MFC-with:		333603

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c	Mon May 28 13:12:34 2018	(r334285)
+++ head/sys/netinet/sctputil.c	Mon May 28 13:31:47 2018	(r334286)
@@ -831,7 +831,7 @@ sctp_get_prev_mtu(uint32_t val)
 {
 	uint32_t i;
 
-	val &= 0x00000003;
+	val &= 0xfffffffc;
 	if (val <= sctp_mtu_sizes[0]) {
 		return (val);
 	}
@@ -857,7 +857,7 @@ sctp_get_next_mtu(uint32_t val)
 	/* select another MTU that is just bigger than this one */
 	uint32_t i;
 
-	val &= 0x00000003;
+	val &= 0xfffffffc;
 	for (i = 0; i < (sizeof(sctp_mtu_sizes) / sizeof(uint32_t)); i++) {
 		if (val < sctp_mtu_sizes[i]) {
 			KASSERT((sctp_mtu_sizes[i] & 0x00000003) == 0,


More information about the svn-src-head mailing list