diff options
| author | Michael Tuexen <tuexen@FreeBSD.org> | 2024-02-23 20:40:46 +0000 |
|---|---|---|
| committer | Michael Tuexen <tuexen@FreeBSD.org> | 2024-02-23 20:40:46 +0000 |
| commit | 533faf21c19d0fa4bc3c0a986c67667991f90883 (patch) | |
| tree | 4cec4712b8246b1aba352f0005bb4d6160d25d8c /sys/netinet/sctp_output.c | |
| parent | 89189224adb560af6de2bb2e13a2b1831b89101d (diff) | |
Diffstat (limited to 'sys/netinet/sctp_output.c')
| -rw-r--r-- | sys/netinet/sctp_output.c | 9 |
1 files 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; |
