From nobody Wed Feb 4 22:37:11 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 4f5wG25CZ3z6Qlbd; Wed, 04 Feb 2026 22:37:14 +0000 (UTC) (envelope-from glebius@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 4f5wG24Dxzz3Kv2; Wed, 04 Feb 2026 22:37:14 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770244634; 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: in-reply-to:in-reply-to:references:references; bh=Dy77t283pKRJ6LiTF9CacoB937tfE260Hm5ElcFW8jQ=; b=S+rTcSBDonVb+oXiOa6RkcEVJ4Y7bGqd8U6j0q5bcx/y7TA+4Fw6Hr8piCdCiQO+uu2Zat Xpidnw35DosUT1lfACJTpdXjuJvF/f6Gv9YD9Y8reJDaCthXEeC5YDdQTovWwttWm6QJBJ uWZHQhPTdqMrlczeft8J0J66tcSuaheK7g1Ebd/XH9jGFfA2N9gMcLF97lKJCJu0HuJvUa Peca2K7gXpdaV+5UwJTCBSflXc+vG4QcEZ2EI4N2wgTTsT3sE2lI/amDMzFvORpgYZXK41 31PHj6jccUyWhznqY1itU9NoDtHMPgnZ+OA8io0mFfwxSXH3EMXX5Q0XQqzsqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770244634; a=rsa-sha256; cv=none; b=MWfI+1mmCX2FcCVtqrh2qdw/SMiEEWl4dhmJFVoKnHoWQ4UyNWlcB6aci6oB8apTsXYUpy BrPUXurwEqdbNqnl8Rs3EpeB2TsHIoOK2/4QgRb7o9ilTfP57O4qdzn+f/Bp4KSYVNdaeA INIUL9w2W6r/q1DERGxE5w/tIwDqKkDXfYx0dAe7QhL21kPYRsZ01d+qHyxWyGfC0RtMVr QYqQySw9i0gmcG78lGfcAfFTCDLTrZf5D3cJxM7ELOCGJjU5pwx6tgAXGRQx8bdvGHuBlu /FZk6VDbHjJJY8M+H4y9scboI1qZJXmvaz8aTQzjoHU+gIaybsALqMOws8ukcA== 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=1770244634; 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: in-reply-to:in-reply-to:references:references; bh=Dy77t283pKRJ6LiTF9CacoB937tfE260Hm5ElcFW8jQ=; b=TRmbSbdWwYy66Z2UiPZ3BN+SU3Rt3243SDQVZ3ACdshGu4qvME/ufUMTKFqTWj31BvkUlA GJHsX/1xabRhFzOrNu/0P4klqKaFUkPbbduU7eOq7UXYVBaOS75colHN5mslU29OAKnlfv dFpijRa5DCq9g1x3sc+8wGFV5CKFnqXPIZmHXrUB53G9T7hZpn1oKf8NMXhATMqRUaTCox Hp9UxchsPebYCagw+ajPhwSMxauHjMDFyudmByKgotVfiTNiDh4kWJZx2101aKO3pMusBO CJdtK+7Am1GsKf7Jxe7xyVghQNccsJBKNTaMo90dDk1uJtuc8EZf5dx/mFeFmg== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4f5wG172nZzv6G; Wed, 04 Feb 2026 22:37:13 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Wed, 4 Feb 2026 14:37:11 -0800 From: Gleb Smirnoff To: Michael Tuexen Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d195b3783fa4 - main - sctp: fix socket type created by sctp_peeloff() Message-ID: References: <697e46e9.2271d.66b41ecf@gitrepo.freebsd.org> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Feb 03, 2026 at 08:24:10PM +0100, Michael Tuexen wrote: M> > M> VNET_ASSERT(head->so_vnet != NULL, ("%s:%d so_vnet is NULL, head=%p", M> > M> __func__, __LINE__, head)); M> > M> + KASSERT(head->so_type == SOCK_SEQPACKET, M> > M> + ("%s: unexpecte so_type: %d", __func__, head->so_type)); M> > M> so = soalloc(head->so_vnet); M> > M> if (so == 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 = head->so_type; M> > M> + so->so_type = SOCK_STREAM; M> > M> so->so_options = head->so_options; M> > M> so->so_linger = head->so_linger; M> > M> so->so_state = (head->so_state & SS_NBIO) | SS_ISCONNECTED; M> > M> > This creates a socket where: M> > M> > so->so_type != so->so_proto->pr_type. M> > 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? 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. -- Gleb Smirnoff