Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2024 20:42:57 GMT
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 533faf21c19d - main - sctp: improve consistency
Message-ID:  <202402232042.41NKgvUN006953@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=533faf21c19d0fa4bc3c0a986c67667991f90883

commit 533faf21c19d0fa4bc3c0a986c67667991f90883
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-02-23 20:40:46 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-02-23 20:40:46 +0000

    sctp: improve consistency
    
    MFC after:      1 week
---
 sys/netinet/sctp_output.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index d7742222a3bf..c988a8426fe8 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -5039,11 +5039,16 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt,
 			at += padded_size;
 			break;
 		case SCTP_HAS_NAT_SUPPORT:
+			if (padded_size != sizeof(struct sctp_paramhdr)) {
+				SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error nat support %d\n", plen);
+				goto invalid_size;
+			}
 			*nat_friendly = 1;
-			/* FALLTHROUGH */
+			at += padded_size;
+			break;
 		case SCTP_PRSCTP_SUPPORTED:
 			if (padded_size != sizeof(struct sctp_paramhdr)) {
-				SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error prsctp/nat support %d\n", plen);
+				SCTPDBG(SCTP_DEBUG_OUTPUT1, "Invalid size - error prsctp %d\n", plen);
 				goto invalid_size;
 			}
 			at += padded_size;



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