]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 18 Jan 2025 01:06:45 +0000 (02:06 +0100)
committerGitHub <noreply@github.com>
Sat, 18 Jan 2025 01:06:45 +0000 (01:06 +0000)
commit8a8f5d636d06c122bc1db0ee6b11a883e550a803
treee387e9110b5236b56fd626d36c3d7b01a2385d0b
parent8ee250bdd984c290f4c396657e937ce5d4ffdcff
[3.12] gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933) (#128970)

gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933)

* gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets

Do not attempt to set ``SO_REUSEPORT`` on sockets of address familifies other
than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these address
families, and the call with fail with Linux kernel 6.12.9 and newer.

* Apply suggestions from code review

---------
(cherry picked from commit 3829104ab412a47bf3f36b8c133c886d2cc9a6d4)

Co-authored-by: Michał Górny <mgorny@gentoo.org>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Lib/asyncio/base_events.py
Lib/socket.py
Lib/socketserver.py
Misc/NEWS.d/next/Library/2025-01-17-11-46-16.gh-issue-128916.GEePbO.rst [new file with mode: 0644]