]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-46626: Expose IP_BIND_ADDRESS_NO_PORT socket option. (GH-31106)
authorBenjamin Peterson <benjamin@python.org>
Thu, 3 Feb 2022 18:46:50 +0000 (10:46 -0800)
committerGitHub <noreply@github.com>
Thu, 3 Feb 2022 18:46:50 +0000 (10:46 -0800)
Misc/NEWS.d/next/Library/2022-02-03-10-22-42.bpo-46626.r2e-n_.rst [new file with mode: 0644]
Modules/socketmodule.c

diff --git a/Misc/NEWS.d/next/Library/2022-02-03-10-22-42.bpo-46626.r2e-n_.rst b/Misc/NEWS.d/next/Library/2022-02-03-10-22-42.bpo-46626.r2e-n_.rst
new file mode 100644 (file)
index 0000000..aaca73d
--- /dev/null
@@ -0,0 +1 @@
+Expose Linux's ``IP_BIND_ADDRESS_NO_PORT`` option in :mod:`socket`.
index 1c8ef1eb3b5b34ce4f7082acdc6a188711890b48..3fca9f68512e808d4227263959dbccc0d0af122c 100644 (file)
@@ -8072,6 +8072,9 @@ PyInit__socket(void)
 #ifdef  IP_TRANSPARENT
     PyModule_AddIntMacro(m, IP_TRANSPARENT);
 #endif
+#ifdef IP_BIND_ADDRESS_NO_PORT
+    PyModule_AddIntMacro(m, IP_BIND_ADDRESS_NO_PORT);
+#endif
 
     /* IPv6 [gs]etsockopt options, defined in RFC2553 */
 #ifdef  IPV6_JOIN_GROUP