From nobody Wed Apr 17 13:46:53 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VKMdn2p74z5GwVy; Wed, 17 Apr 2024 13:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VKMdn2KChz4mb6; Wed, 17 Apr 2024 13:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713361613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6JYU56md1e/tUHjorehIi65K6HEJb2S/bZAngb+luWQ=; b=Phw2mF/ifbpkPgwZbTr9jXuFddXOJwAzp95+Qigzd8g0n08bYJ0LCIpKyjm9ztpiQtZoRE fQlkPnrVEAOidZWEAQkmqDZGrgq2eqO1i4MnxuIC8F6LYgqRX0QR3uAhktq2/6dujSoRb/ bsT4TcLGPsqlIihQGN133lKO98mAyRq4hEN3UsC6x0Gq5gd1Ki37XkWPSV/8chddWJmrBo fjhSFlEiSrLP40BL3iAIzJyPfCF8gYZ1PCHCjd72edMeySTvkW7dFShGgbBEdTa1j1FNLo 63DUEP5McvUAEL9Izax5eiYx+a+9Ql7X/8KVmIQlyxMpC5Bbc+NWiNkodt6N8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713361613; a=rsa-sha256; cv=none; b=kzCzuzeFpxS67HWj14p2DgheRAfDeDMXMe5bqNuEeqXb7yJ6EbR7+kLuucpZbGaCxc13pc bGALw5vdY8bR4askyfDL1F5Gd0vAJl+LFZx9kZiXODZyfXSRDRsFMLTET0Q1EYtEQvihtw 5IZBAYe+1FZPoIHfJ4b6CO01brxMlzqfApOt/WGJEC4UTXYyU7T7usLb1w0W0APN5hgeiQ jQLOAj9vof5y9+Ti5vG8YsCEZRexUGifvFEkrOskgc/k6cylHTmtQYe2JcJEwPILUatps6 /pRHgk/eZyEkk9jZeCIBtk1on8Py+AAAI0WasrCPl4wHYbEKOv2SGTrdolrcjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713361613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6JYU56md1e/tUHjorehIi65K6HEJb2S/bZAngb+luWQ=; b=Mdtdk6r86NOj6NsVm1p5x4aNyA8hK5o0tWJlGFsD4NQXEdQhItVZ+Dgs+hkG62gEp7Uf+B paeZF817gYYKpv9nIE817ZZKSMkH3nv2Z13XlA2QRGURWopFMeOcAIA8lrnocrUtJ4Nbfm YZeweK9b7+4r6TylDiv64lG1S13CPqVyWfsEygNolslN7OKaAb1YKBQ+n43Bv1BcHWn7SQ IdG5077Tc6V7W+pBUL7xAd+f5bDKL2ZnbEzM+vAQaQzzP8tL4zVvRdpyVnwIdrwHHYwLDK C9m/XjkE3QjQkTWN4t5Ctrstx5/25W/ljTJexnLR7eGzzJnpOdlpqTMo6lPPiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VKMdn1wr8zSmp; Wed, 17 Apr 2024 13:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43HDkreT020065; Wed, 17 Apr 2024 13:46:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43HDkrHO020062; Wed, 17 Apr 2024 13:46:53 GMT (envelope-from git) Date: Wed, 17 Apr 2024 13:46:53 GMT Message-Id: <202404171346.43HDkrHO020062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 49557689bf1e - stable/14 - sctp: improve consistency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 49557689bf1e0297377eac8b42e191a439291f57 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=49557689bf1e0297377eac8b42e191a439291f57 commit 49557689bf1e0297377eac8b42e191a439291f57 Author: Michael Tuexen AuthorDate: 2024-02-23 20:40:46 +0000 Commit: Michael Tuexen 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;