https://github.com/python/cpython/commit/b454662921fd3a1fc27169e91aca03aadea08817
commit: b454662921fd3a1fc27169e91aca03aadea08817
branch: main
author: chrysn <[email protected]>
committer: sobolevn <[email protected]>
date: 2024-10-17T20:49:12+03:00
summary:
gh-118986: expose `socket.IPV6_RECVERR` (#118987)
files:
A Misc/NEWS.d/next/Library/2024-05-13-10-09-41.gh-issue-118986.-r4W9h.rst
M Doc/library/socket.rst
M Modules/socketmodule.c
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 935d4a85342876..0c7b9328648f66 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -451,8 +451,8 @@ Constants
network interface instead of its name.
.. versionchanged:: 3.14
- Added missing ``IP_RECVERR``, ``IP_RECVTTL``, and ``IP_RECVORIGDSTADDR``
- on Linux.
+ Added missing ``IP_RECVERR``, ``IPV6_RECVERR``, ``IP_RECVTTL``, and
+ ``IP_RECVORIGDSTADDR`` on Linux.
.. versionchanged:: 3.14
Added support for ``TCP_QUICKACK`` on Windows platforms when available.
diff --git
a/Misc/NEWS.d/next/Library/2024-05-13-10-09-41.gh-issue-118986.-r4W9h.rst
b/Misc/NEWS.d/next/Library/2024-05-13-10-09-41.gh-issue-118986.-r4W9h.rst
new file mode 100644
index 00000000000000..196da60a950bfb
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-05-13-10-09-41.gh-issue-118986.-r4W9h.rst
@@ -0,0 +1 @@
+Add :data:`!socket.IPV6_RECVERR` constant (available since Linux 2.2).
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 744e5e0c0b2b54..2764bd6e2b2a47 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -8578,6 +8578,9 @@ socket_exec(PyObject *m)
#ifdef IPV6_RECVDSTOPTS
ADD_INT_MACRO(m, IPV6_RECVDSTOPTS);
#endif
+#ifdef IPV6_RECVERR
+ ADD_INT_MACRO(m, IPV6_RECVERR);
+#endif
#ifdef IPV6_RECVHOPLIMIT
ADD_INT_MACRO(m, IPV6_RECVHOPLIMIT);
#endif
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]