]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933)
authorMichał Górny <mgorny@gentoo.org>
Sat, 18 Jan 2025 00:49:16 +0000 (01:49 +0100)
committerGitHub <noreply@github.com>
Sat, 18 Jan 2025 00:49:16 +0000 (16:49 -0800)
commit3829104ab412a47bf3f36b8c133c886d2cc9a6d4
tree3f20643b15d5eb0d2e9ff534a98e1186514d2298
parent8174770d311ba09c07a47cc3ae90a1db2e7d7708
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

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
---------

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]