From nobody Fri Feb 23 20:42:57 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 4ThMQp1tt9z5BTXW; Fri, 23 Feb 2024 20:42:58 +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 4ThMQp1MC7z3xpn; Fri, 23 Feb 2024 20:42:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708720978; 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=l5/gum6HeftRYj3EeKUPStADhCpNJ3Sgd9xBGPFHGhs=; b=Qc+PbOOKh5HZmXzCWYhIYIqUJFw9vjfTeruBhpOUbraBo+5Yxzn0mBh630lAGos7Gtj7vp 9uq8cCApssujKdkmnubpa9xO1rA2T2bSAvHRypHUuGXVwxHFM9WfKRv4D+mhjym253+wSe v53Omhg8SnUSloRFEB4pk/J8G09FtPJsmNuoJngrc7IiiSTVfI9l7O0LUA0KYY8/hv1/mg NLBBqR/sQmwoDCAh0jc0w1fh3NJRMUZxv+Br3Y+LOafddAZEX6vWcK6DaBGAzBYTqvf3c1 giPsOmVqAfmapQRcJJBEg0WRjOb9xUavje2HO2Wo46RxXTQYccWVy3Xw6ySr9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708720978; a=rsa-sha256; cv=none; b=rWC1lF0pnVVLa28nW8FHVDPfYV9RrFLCo3ORnIv2PZTzf2CqSBJyLMt2Orv1Zv4I18CIsc R3m4W94vOoV7I2NE5mnsLddt+RXS4V4UaImYuGyORklP+HntckjeRgm4q1opgPd/p9XS6k AOOF5NO8+AT5kUI4pHH5a4E5T70EMZrge8Dkrji8sGCjqqUZT2S7yUo4wBaZB4zuw421Zh vJtMw5tTxjVO60SguzDDnfEt1EbhhspZy315FHc9xl4zlDQ98+jocQRL0bcd+2DzjBXDoW fRwI11ymJDMWvuhqW6lFwo9pkQpvzvALFS5+br11YxxonZCX0YJfmhycPyuLRg== 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=1708720978; 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=l5/gum6HeftRYj3EeKUPStADhCpNJ3Sgd9xBGPFHGhs=; b=mXcFXbuVQ7RzLsixrF+GN4OhOuzWNv6Z5VQT0qMjLv4t7InSDEHbfRSoyXuOsRpt7cPpk9 01GvaQCyHuR8MhIMp7BAmkdXCuwUeB2+hsepPgZgYq0uShyCSjlQNXqWohqrSp+IRCSd7q BaKon/xfq+yko8fKSlo9uFFzcijspvRA0LCfdc1Fi+91aOx7zmo8KsXd71zC0U5rE+apLF WOqTvAElvY29vCKP8KmmL6oFZolcJfNiJIAywwqFDXzmU7akQkyURGnzFMCosuxUM+Ww3b hlWn4PfajNbpfUn3vyHD4fJEeJAuh1Z1q/w/xtlDjHk7ucT7udp899lkYbnCLA== 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 4ThMQp0PyGzX8D; Fri, 23 Feb 2024 20:42:58 +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 41NKgvoh006956; Fri, 23 Feb 2024 20:42:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41NKgvUN006953; Fri, 23 Feb 2024 20:42:57 GMT (envelope-from git) Date: Fri, 23 Feb 2024 20:42:57 GMT Message-Id: <202402232042.41NKgvUN006953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 533faf21c19d - main - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: 533faf21c19d0fa4bc3c0a986c67667991f90883 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=533faf21c19d0fa4bc3c0a986c67667991f90883 commit 533faf21c19d0fa4bc3c0a986c67667991f90883 Author: Michael Tuexen AuthorDate: 2024-02-23 20:40:46 +0000 Commit: Michael Tuexen 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;