From nobody Fri Feb 6 10:26:52 2026 X-Original-To: dev-commits-src-main@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 4f6qyZ0GcXz6Qy3J; Fri, 06 Feb 2026 10:27:02 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f6qyY570Wz45lW; Fri, 06 Feb 2026 10:27:01 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770373621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=waz4gwxXBmeB1IRa4QCWgeOR3bhTMDFSLGE4CmAtnBs=; b=shWVOEaU7UCMSXSxGx8v0HTXed7wJppsc7epNVU2KmQR84FIdm/HCM+rbkn/cAJdA0Cb/X 4LdrtR6uTRzv4yatoauSMeYChIjyJILc/5kEbQG/LXoBe54DX4s0+lDLn+m6VcEW+b9TC3 ncEYohxd5T6VkC2ZIR6LARR6b4spij/fSFwFUqsubJ2U4v4/1t9qFIzs67yqb6WG0DYib4 NoXB6XRCc6VvT6FsfFpQ889VUWnfGIkOtqwDNo6ZIOUL0gepvJ2cGyVCmGuzBmHozyE1Hj jew9DhHbLhLf3x9x3zoidIirgxSLflnh5i6OnFnNLhCDJuPknFXxarFfK3iNxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770373621; a=rsa-sha256; cv=none; b=kdEkJnsj+dn3Tycy0q8z0AkY04Lp/vGIi+rUF5jh9mjAKVp72ojzGlBVSVtKa+DRpbKNwE PFfTsdS31RCjQKXrz/EFqy7DLhyF/1yz8ImSSccirA6kpwBj6ZQFvbeo2cxvThIY9rCoxw /M4q+pVI5t55EYTF8RBgfpB6G+imfnaMeUfbHsGE46D5Pq0kajlFG0Rq7MoMUlbAVTLvib kLbwgN5ZlILFOlD2gGAJO5NKVFb0ZEkrRGHweUCmCJzO+JrmHLJsva8Oh7kiIqLyn8R2CT oa5S4jGh3rVEMClCF0CvWvm4ouk4KBDMUYn4n9zHYsnjkC947p3fex9i0PEDTg== 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=1770373621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=waz4gwxXBmeB1IRa4QCWgeOR3bhTMDFSLGE4CmAtnBs=; b=AX2tXs7hx1SeQGs0zeND4737A3eaEvi/PY6WOpy6/op8Ow9vCyWNAOWOmSlf21ymWfCcE3 XyF4dyLaT8ZVR2u5xOGH66xPgxp98NC7AJ9tvehFii78xqOfqzHtZaJBkGH96/SkDeB/5P oAaR101/CFyoB2OaA9SYVVToxeRLS3sxD5xvxprQBQ4C60xPLtcvK8uKBjN5RQpqnEqils KhvBrxn4qTAeOoWsoinNESxP82IyDcocoRWwCz6L56qeQMyJGizJpjwH/CbCMEsT9RDNzs ghA7xCUi2KTcu54FEtHMFvqPT4nXxPpZPbjyDoFa4qirMM4/ilNZbv3+AmgReg== Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1101:be00:614d:4071:7145:c2c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: tuexen) by smtp.freebsd.org (Postfix) with ESMTPSA id 4f6qyX2xGLzF6f; Fri, 06 Feb 2026 10:27:00 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.300.41.1.7\)) Subject: Re: git: d195b3783fa4 - main - sctp: fix socket type created by sctp_peeloff() From: Michael Tuexen In-Reply-To: Date: Fri, 6 Feb 2026 11:26:52 +0100 Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0A0F4504-8243-4B11-880B-89A1BDAAB3BF@FreeBSD.org> References: <697e46e9.2271d.66b41ecf@gitrepo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3864.300.41.1.7) > On 4. Feb 2026, at 23:37, Gleb Smirnoff wrote: >=20 > On Tue, Feb 03, 2026 at 08:24:10PM +0100, Michael Tuexen wrote: > M> > M> VNET_ASSERT(head->so_vnet !=3D NULL, ("%s:%d so_vnet is = NULL, head=3D%p", > M> > M> __func__, __LINE__, head)); > M> > M> + KASSERT(head->so_type =3D=3D SOCK_SEQPACKET, > M> > M> + ("%s: unexpecte so_type: %d", __func__, head->so_type)); > M> > M> so =3D soalloc(head->so_vnet); > M> > M> if (so =3D=3D NULL) { > M> > M> log(LOG_DEBUG, "%s: pcb %p: New socket allocation failure: " > M> > M> @@ -1311,7 +1313,7 @@ sopeeloff(struct socket *head) > M> > M> __func__, head->so_pcb); > M> > M> return (NULL); > M> > M> } > M> > M> - so->so_type =3D head->so_type; > M> > M> + so->so_type =3D SOCK_STREAM; > M> > M> so->so_options =3D head->so_options; > M> > M> so->so_linger =3D head->so_linger; > M> > M> so->so_state =3D (head->so_state & SS_NBIO) | = SS_ISCONNECTED; > M> >=20 > M> > This creates a socket where: > M> >=20 > M> > so->so_type !=3D so->so_proto->pr_type. > M> >=20 > M> > I'm not sure this is a good idea. I was actually looking into = removing so_type > M> > at all. What does SCTP idea is about this peel-off thing? If = the resulting > M> > socket is a stream one, shouldn't its so_proto point at = sctp_stream_protosw? > M> Yes, that makes sense. > M> But this is now a generic routine (I think it was an SCTP specific = one in the past), > M> how can I refer to it without using sctp_stream_protosw? >=20 > It was never generic, albeit put into generic file. It lives under = #ifdef > SCTP. I'm all for moving it entirely into SCTP related file. OK. Let me see how to fix it. Best regards Michael >=20 > --=20 > Gleb Smirnoff