[Python-checkins] bpo-43571: Add IPPROTO_MPTCP macro (GH-24946)

gpshead webhook-mailer at python.org
Sat Mar 20 18:05:03 EDT 2021

commit: b05b48dd7ab68bf0046356f2abd6d7fe3b5b3d77
branch: master
author: Rui Cunha <rpmonteiro24 at hotmail.com>
committer: gpshead <greg at krypto.org>
date: 2021-03-20T15:04:56-07:00

bpo-43571: Add IPPROTO_MPTCP macro (GH-24946)

Add IPPROTO_MPTCP constant when defined in the system headers.

A Misc/NEWS.d/next/Library/2021-03-20-17-40-35.bpo-43571.acAL0W.rst
M Doc/library/socket.rst
M Doc/whatsnew/3.10.rst
M Modules/socketmodule.c

diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 2255b827aa8eb..31d804ce294a8 100755
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -610,6 +610,9 @@ The following functions all create :ref:`socket objects <socket-objects>`.
    .. versionchanged:: 3.9
        The CAN_J1939 protocol was added.
+   .. versionchanged:: 3.10
+       The IPPROTO_MPTCP protocol was added.
 .. function:: socketpair([family[, type[, proto]]])
    Build a pair of connected socket objects using the given address family, socket
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 51b3331be89e2..b5e425293962c 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -800,6 +800,9 @@ socket
 The exception :exc:`socket.timeout` is now an alias of :exc:`TimeoutError`.
 (Contributed by Christian Heimes in :issue:`42413`.)
+Added option to create MPTCP sockets with ``IPPROTO_MPTCP``
+(Contributed by Rui Cunha in :issue:`43571`.)
diff --git a/Misc/NEWS.d/next/Library/2021-03-20-17-40-35.bpo-43571.acAL0W.rst b/Misc/NEWS.d/next/Library/2021-03-20-17-40-35.bpo-43571.acAL0W.rst
new file mode 100644
index 0000000000000..56714dc86bd56
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2021-03-20-17-40-35.bpo-43571.acAL0W.rst
@@ -0,0 +1 @@
+It's now possible to create MPTCP sockets with IPPROTO_MPTCP
\ No newline at end of file
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 0f56d94229fba..23aab59d9749a 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -7927,6 +7927,9 @@ PyInit__socket(void)
 #ifdef  IPPROTO_BIP
     PyModule_AddIntMacro(m, IPPROTO_BIP);
+    PyModule_AddIntMacro(m, IPPROTO_MPTCP);
 #ifdef  IPPROTO_RAW
     PyModule_AddIntMacro(m, IPPROTO_RAW);

More information about the Python-checkins mailing list