lb8Onood4u/aVykIpcdS2CSTsb7hmeXMG1UHxb 9YRkdKnDX/ZbDsXAsA72CedOesHZSOXerFQlsrCYyUaHRKUcNpTd3xiugAMeRiRfpRB3Y9 RBN7lgwiAmdIoyr+OXhB2hLkxPwykUb5Stv2dSYHxN19kWEtNtXGFoV2Vnls5ui52rpfID S5vGEfRnUxZMGuNQvYSLCeEHkeFFAzGM3yxmWbJIhhZtFZD9CM6IgNrfej+axhjBzBMatA +7Oh1AeZYpLUR7VmujXYT7NOKIc6neiybMYPeB9zEB5LSbwXrRVlTkE+5raBkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1766166486; a=rsa-sha256; cv=none; b=oby6BrH+CIi4bmubArk4mZK57C//63ss8FfOzLjwmrsU7TnPI9BXOmuNZ6FymlvCe+x9OW X3tgi+EGjfjEQ4jX96R9Llw7Rx8OUJud5ms8lEHORuKURtzva6yaLxEzxnx22WNetqFpA7 0gCGw2dMcvG7Cqwo1rdCISE9I8uiZed570mLSV9w8j2axwjF/GvPR/2K+pWdxyQWd1V28I w1rK33zlX0LtLUbicrd9xGbTLZTGEAswNiVpD31eWBvU+l+Ygv83VEocIn6SwkYKvAgV+l Gk8uK5/WsMZG2NxZiEsgTAsMHRlUz5OyL2HugDkUcR6fB4jqSvIYd0EOu/wqFw== 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 4dXw4454PBzqM9; Fri, 19 Dec 2025 17:48:04 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 19 Dec 2025 09:48:00 -0800 From: Gleb Smirnoff To: Mark Johnston Cc: Konstantin Belousov , 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 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 Fri, Dec 19, 2025 at 10:12:42AM -0500, Mark Johnston wrote: M> > > All known software in ports had been addressed three years ago and the M> > > shim stays in stable/14 and stable/15 for another couple years with its M> > > printf(), so all ourliers are expected to conform before 16.0-RELEASE. M> > > See 8624f4347e8133911b0554e816f6bedb56dc5fb3 for details. M> > So why breaking the binaries that users might have lingering around? M> M> Aside from that, with a PF_DIVERT socket sd it's not possible to call M> sd.recvfrom() in python (because python doesn't know which sockaddr M> subtype to use), whereas with a PF_INET divert socket it gives a M> sockaddr_in with an interface address, for inbound packets. This means my submission to python back in 2022 was missing couple lines. The Modules/socketmodule.c:makesockaddr() is missing a case. :( If people were not ignoring the warning message and switched to PF_DIVERT earlier, I would learn that my patch to python was missing a bit earlier. I will start a new submission to python. Usually they are very slow to accept. I'm fine if you revert e967a2a03677. But let's plan to remove it before stable/17. M> So some M> applications cannot be quickly repaired. In fact, I'd find it useful to M> go the other way and add support for M> socket(PF_INET6, SOCK_RAW, IPPROTO_DIVERT). How this will help? The divert(4) is actually not tied to any protocol. If you use ipfw layer 2 divert, the socket will receive Ethernet frames. -- Gleb Smirnoff