git: 49557689bf1e - stable/14 - sctp: improve consistency
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 Apr 2024 13:46:53 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=49557689bf1e0297377eac8b42e191a439291f57
commit 49557689bf1e0297377eac8b42e191a439291f57
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-02-23 20:40:46 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-04-17 13:46:32 +0000
sctp: improve consistency
(cherry picked from commit 533faf21c19d0fa4bc3c0a986c67667991f90883)
---
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;