From 5e0fa3b8148905ec336f35de5a29ef4fc93dd8a7 Mon Sep 17 00:00:00 2001 From: tuexen Date: Mon, 28 May 2018 13:31:47 +0000 Subject: [PATCH] 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 --- sys/netinet/sctputil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 6c251deb35fa..98b11bf65a88 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -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,