Skip to content

gh-132991: Add socket.IP_FREEBIND constant #132998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/library/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ Constants
network interface instead of its name.

.. versionchanged:: 3.14
Added missing ``IP_RECVERR``, ``IPV6_RECVERR``, ``IP_RECVTTL``, and
``IP_RECVORIGDSTADDR`` on Linux.
Added missing ``IP_FREEBIND``, ``IP_RECVERR``, ``IPV6_RECVERR``,
``IP_RECVTTL``, and ``IP_RECVORIGDSTADDR`` on Linux.

.. versionchanged:: 3.14
Added support for ``TCP_QUICKACK`` on Windows platforms when available.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add :data:`!socket.IP_FREEBIND` constant on Linux 2.4 and later.
3 changes: 3 additions & 0 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -8829,6 +8829,9 @@ socket_exec(PyObject *m)
#ifdef IP_MAX_MEMBERSHIPS
ADD_INT_MACRO(m, IP_MAX_MEMBERSHIPS);
#endif
#ifdef IP_FREEBIND
ADD_INT_MACRO(m, IP_FREEBIND);
#endif
#ifdef IP_TRANSPARENT
ADD_INT_MACRO(m, IP_TRANSPARENT);
#endif
Expand Down
Loading