Date: Fri, 19 Dec 2025 12:51:00 -0800 From: Gleb Smirnoff <glebius@freebsd.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Mark Johnston <markj@freebsd.org>, 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: <aUW6tNuTDw-xM_tV@cell.glebi.us> In-Reply-To: <aUW3pdfo1PvTgzDr@kib.kiev.ua> References: <693a275a.2e7b3.1858af56@gitrepo.freebsd.org> <aTo89YdeZByEuZov@kib.kiev.ua> <aUVralcxtt3d8plJ@nuc> <aUWP0F-5QH5DMxZn@cell.glebi.us> <aUWRwsk5Xly_KLV5@kib.kiev.ua> <aUWUaawaU8RbsS_l@cell.glebi.us> <aUWuHb-l6SGV3CV-@kib.kiev.ua> <aUWy_L-wO0XcI5Do@cell.glebi.us> <aUW3pdfo1PvTgzDr@kib.kiev.ua>
index | next in thread | previous in thread | raw e-mail
On Fri, Dec 19, 2025 at 10:37:57PM +0200, Konstantin Belousov wrote: K> > K> It has no relation to the fact that there are other ways to get the same K> > K> behaviour from the system. The removal of that three lines breaks existing K> > K> binaries. Also it does not matter that e.g. newer versions of some apps K> > K> do not use that feature (feature as in binary interface, not a system K> > K> behaviour). The existing binaries must continue to work. K> > K> > We already have had this argument before for a different kind of issue - K> > POLLINIGNEOF. The existence of such binaries is like existence the the God. K> > You can't prove they exist. I can't prove they do not exist. You advocate for K> > the compat shim to exist forever. I advocate to limit it existence to some K> > countable number of years. K> > K> > For this particular case all open source software had been addressed. There K> > are no known shareware binaries in the wild that used AF_INET/IPPROTO_DIVERT. K> I do not understand this statement. It was demonstrated in this thread K> that python had it. Python itself doesn't use divert(4). It allows scripts to open the divert sockets using constants instead of numbers, that's all. It is not the python but legacy scripts that use the old PF_INET/IPPROTO_DIVERT tuple that need adjustment. Python knows PF_DIVERT constant since 3.12. In our ports it is patched to know PF_DIVERT for all possible versions in ports. What Mark pointed out is that python's support of PF_DIVERT is not complete, wrt recvfrom method. I'm working on fixing it. I'm fine with prolonging existence of the shim until python 3.11 goes out of support, which is 2027-10. K> > Those hypothethical binaries that we can't prove/refute existence of in some K> > corporate environments would print a warning on 14.x and on 15.x providing a K> > time to their owners to recompile. If we speculate that somewhere in the K> > universe exists a corporate body that uses AF_INET/IPPROTO_DIVERT tuple in K> > their internal software and have lost its source code, they have a solution. K> > The solution is a tiny preloaded library that would intercept socket(2). Of K> > course you may say that somewhere in the world exists a closed ecosystem that K> > uses AF_INET/IPPROTO_DIVERT in a binary AND the sources for the binary were K> > lost AND the binary is statically compiled. If you decide to go that deep into K> > the rabbit hole, I would reply that owners of such a binary should bit hack it K> > to use the correct tuple before call to socket(2). K> No. You abruptly break binary compatibility and claim that this is fine. K> It is not. Can you please elaborate what question are you answering with "No"? If you think that my deprecation was too abrupt, can you please suggest your deprecation plan? -- Gleb Smirnoffhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aUW6tNuTDw-xM_tV>
