From nobody Fri Dec 19 17:56:18 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 4dXwFp71Kgz6M8KB; Fri, 19 Dec 2025 17:56:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4dXwFp3KDtz430S; Fri, 19 Dec 2025 17:56:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 5BJHuIBK085978; Fri, 19 Dec 2025 19:56:21 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5BJHuIBK085978 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5BJHuIVo085977; Fri, 19 Dec 2025 19:56:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Dec 2025 19:56:18 +0200 From: Konstantin Belousov To: Gleb Smirnoff 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: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dXwFp3KDtz430S On Fri, Dec 19, 2025 at 09:48:00AM -0800, Gleb Smirnoff wrote: > 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. Why? Apparently, the feature is widely used by applications. It is even present in python. Breaking it is abrupt and must be reverted. > > 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