Skip to content

Commit 9ddc388

Browse files
authored
gh-124761: add socket.SO_REUSEPORT_LB (#124961)
1 parent 42f7a00 commit 9ddc388

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Doc/library/socket.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,14 @@ Constants
674674

675675
.. availability:: Linux >= 3.9
676676

677+
.. data:: SO_REUSEPORT_LB
678+
679+
Constant to enable duplicate address and port bindings with load balancing.
680+
681+
.. versionadded:: next
682+
683+
.. availability:: FreeBSD >= 12.0
684+
677685
.. data:: AF_HYPERV
678686
HV_PROTOCOL_RAW
679687
HVSOCKET_CONNECT_TIMEOUT
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add :data:`~socket.SO_REUSEPORT_LB` constant to :mod:`socket` for FreeBSD.

Modules/socketmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7916,6 +7916,9 @@ socket_exec(PyObject *m)
79167916
ADD_INT_MACRO(m, SO_REUSEPORT);
79177917
#endif
79187918
#endif
7919+
#ifdef SO_REUSEPORT_LB
7920+
ADD_INT_MACRO(m, SO_REUSEPORT_LB);
7921+
#endif
79197922
#ifdef SO_SNDBUF
79207923
ADD_INT_MACRO(m, SO_SNDBUF);
79217924
#endif

0 commit comments

Comments
 (0)