]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-118986: expose `socket.IPV6_RECVERR` (#118987)
authorchrysn <chrysn@fsfe.org>
Thu, 17 Oct 2024 17:49:12 +0000 (19:49 +0200)
committerGitHub <noreply@github.com>
Thu, 17 Oct 2024 17:49:12 +0000 (20:49 +0300)
Doc/library/socket.rst
Misc/NEWS.d/next/Library/2024-05-13-10-09-41.gh-issue-118986.-r4W9h.rst [new file with mode: 0644]
Modules/socketmodule.c

index 935d4a853428766bba138aa11c994d8d41b025a5..0c7b9328648f668d3dd16ecdda5084db62e81f85 100644 (file)
@@ -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 (file)
index 0000000..196da60
--- /dev/null
@@ -0,0 +1 @@
+Add :data:`!socket.IPV6_RECVERR` constant (available since Linux 2.2).
index 744e5e0c0b2b54d529626e349b5211a9b69828b8..2764bd6e2b2a47dc391f838da21de5b719966da8 100644 (file)
@@ -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