From nobody Fri Dec 19 18:07:37 2025 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 4dXwVj4NCWz6M9GH; Fri, 19 Dec 2025 18:07:41 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dXwVj2ZbZz47JC; Fri, 19 Dec 2025 18:07:41 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766167661; 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=Xdiqimv749EoRcCS3U47wa4dsrJeTB7PvFcE/nDNYdM=; b=xLUR/3iizqM/NVaE7CRI+g0oAIcw9yLqZb7BwNWWhRMpDY1r32/uzbUz0s6cYImmvNLJEH 2hq1QTLgiKndZQEz5C0snIlQBryyNn3yfIYwf8x0Emd5Wj1HRpbsCMNljY8zdD9LmR+9fO Rjh3toepFLPQ2S9tSXLYn71ANGXPKEl8dkrzJN/B3t1ywiUne7u/mP83Qecz5NimigjhKL XmHZ/aj+IJWAFSxq8Il4qQkkgkCfejBG9MJJ0FXghFXFsQKJQ7WC8xEfPwutfw3m4/HXnw avf0pbtETK2abQ4GNTdFo/+xod3E6PMPDr6LvFwHj6TxvIH0T5hTDbEmRMqGXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1766167661; 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=Xdiqimv749EoRcCS3U47wa4dsrJeTB7PvFcE/nDNYdM=; b=Ya0rZyW0et+9LP8kpoCNeh/w++UcO5DIO/EYA26ixwrPmVWILmd7hQhsvKff6Xa99uZA8O mZSHbEAyxjMdcciTXsyEVMbn1mwbtRYaiuYEm3t9dgaPKdPNu11REeZ0NpI1fe8efcssyc ih5TTJDSKJlC46Zo6TiVEEH7QzqA0ir6DADyfqn9r/7B0JkMj32scVFKu02s5u49jW5k+v qvGLV+dN0mJw07+uP/xtqoYCzuUrPfjgh6ormZRnfjxCFf8nYLwc3Wxz/z1go+G6sE9I+P H9ukJV5rYDQ459vALUvRfw+nu4GsWJ5eRSl2jyN1dW2KV1bgGUosdzMKsyiMXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766167661; a=rsa-sha256; cv=none; b=T8E6VLsvpPPVNcedRMUWBEEKQgDKrpqaNLbpaH9kzcPxYVZGkiGC2LA+BeHM8e2pNWSGwq KrsumeN2AYROSw6U4Bz8Om9MNo8Q08b0mnsWOcxP3gDPNEbeEF9KHVxotQxKYuVx2HM3hl bspCcIckOCbNbP3QedsJkc/uj4XLvL9rKRVmkZr1aGgqHr7F7Z89sC/6lVP29HHGgaiTkU 5pamXLt3SEoJ/GGbxBa5XuUDcQEqe/YNVwCLpdTZJqABZAwU9QJVcBwJM1vf2na3abgDNy F/sDdybUtsRd5iU0y+zRJmtdpofXaHU93Wn92c69qXo72k3MkNe65aHKdyD6yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4dXwVg4GgGzrN1; Fri, 19 Dec 2025 18:07:39 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 19 Dec 2025 10:07:37 -0800 From: Gleb Smirnoff To: Konstantin Belousov Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@gitrepo.freebsd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Dec 19, 2025 at 07:56:18PM +0200, Konstantin Belousov wrote: K> On Fri, Dec 19, 2025 at 09:48:00AM -0800, Gleb Smirnoff wrote: K> > On Fri, Dec 19, 2025 at 10:12:42AM -0500, Mark Johnston wrote: K> > M> > > All known software in ports had been addressed three years ago and the K> > M> > > shim stays in stable/14 and stable/15 for another couple years with its K> > M> > > printf(), so all ourliers are expected to conform before 16.0-RELEASE. K> > M> > > See 8624f4347e8133911b0554e816f6bedb56dc5fb3 for details. K> > M> > So why breaking the binaries that users might have lingering around? K> > M> K> > M> Aside from that, with a PF_DIVERT socket sd it's not possible to call K> > M> sd.recvfrom() in python (because python doesn't know which sockaddr K> > M> subtype to use), whereas with a PF_INET divert socket it gives a K> > M> sockaddr_in with an interface address, for inbound packets. K> > K> > This means my submission to python back in 2022 was missing couple lines. The K> > Modules/socketmodule.c:makesockaddr() is missing a case. :( K> > K> > If people were not ignoring the warning message and switched to PF_DIVERT K> > earlier, I would learn that my patch to python was missing a bit earlier. K> > K> > I will start a new submission to python. Usually they are very slow to accept. K> > I'm fine if you revert e967a2a03677. But let's plan to remove it before K> > stable/17. K> Why? Because 99.9999% socket() syscalls specify correct domain/type tuple but still do this check. 99% FreeBSD's don't event have ipdivert.ko loaded or added to kernel config. And out of 1% that uses divert, 99% specify correct PF_DIVERT domain, cause all known software had been addressed. K> Apparently, the feature is widely used by applications. It is even present K> in python. Breaking it is abrupt and must be reverted. First, I am not removing any features. The divert(4) feature only get better with my changes back in 2022. Second, python also knows about PF_DIVERT since version 3.12. As Mark noted the patch to python wasn't complete and I'm working on this now. So I'm fine with prolonging the compat shim, but not forever. -- Gleb Smirnoff