Skip to contentSkip to conversation

mptcp: set remote_deny_join_id0 on SYN recv

PATCH Applied Matthieu Baerts (NGI0) 2 participants 2 messages Sep 19, 2025 – Sep 21, 2025

Subsystems (3)
lore
Share & tools
lore

Matthieu Baerts (NGI0)

author maintainer
#0 lore raw

PATCH 1/1 mptcp: set remote_deny_join_id0 on SYN recv

commit 96939cec994070aa5df852c10fad5fc303a97ea3 upstream.

When a SYN containing the 'C' flag (deny join id0) was received, this piece of information was not propagated to the path-manager.

Even if this flag is mainly set on the server side, a client can also tell the server it cannot try to establish new subflows to the client's initial IP address and port. The server's PM should then record such info when received, and before sending events about the new connection.

[ Conflicts in subflow.c, because of differences in the context, e.g.
introduced by commit 3a236aef280e ("mptcp: refactor passive socket initialization"), which is not in this version. The same lines -- using 'mptcp_sk(new_msk)' instead of 'owner' -- can still be added approximately at the same place, before calling mptcp_pm_new_connection(). ]

---
 net/mptcp/subflow.c | 3 +++
 1 file changed, 3 insertions(+)
net/mptcp/subflow.c +3 -0
index 6bc36132d490..f67d8c98d58a 100644
@@ -758,6 +758,9 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,
 			 */
 			WRITE_ONCE(mptcp_sk(new_msk)->first, child);
 
+			if (mp_opt.deny_join_id0)
+				WRITE_ONCE(mptcp_sk(new_msk)->pm.remote_deny_join_id0, true);
+
 			/* new mpc subflow takes ownership of the newly
 			 * created mptcp socket
 			 */
Signature · 1 line
2.51.0
maintainer Applied
#1 lore raw

Patch "mptcp: set remote_deny_join_id0 on SYN recv" has been added to the 5.15-stable tree

This is a note to let you know that I've just added the patch titled

mptcp: set remote_deny_join_id0 on SYN recv

to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mptcp-set-remote_deny_join_id0-on-syn-recv.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From [email protected] Sat Sep 20 01:18:05 2025
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Sat, 20 Sep 2025 01:17:44 +0200
Subject: mptcp: set remote_deny_join_id0 on SYN recv
To: [email protected], [email protected], [email protected]
Cc: MPTCP Upstream <[email protected]>, "Matthieu Baerts (NGI0)" <[email protected]>, Mat Martineau <[email protected]>, Jakub Kicinski <[email protected]>
Message-ID: <[email protected]>

From: "Matthieu Baerts (NGI0)" <[email protected]>

commit 96939cec994070aa5df852c10fad5fc303a97ea3 upstream.

When a SYN containing the 'C' flag (deny join id0) was received, this piece of information was not propagated to the path-manager.

Even if this flag is mainly set on the server side, a client can also tell the server it cannot try to establish new subflows to the client's initial IP address and port. The server's PM should then record such info when received, and before sending events about the new connection.

[ Conflicts in subflow.c, because of differences in the context, e.g.
introduced by commit 3a236aef280e ("mptcp: refactor passive socket initialization"), which is not in this version. The same lines -- using 'mptcp_sk(new_msk)' instead of 'owner' -- can still be added approximately at the same place, before calling mptcp_pm_new_connection(). ]

---
 net/mptcp/subflow.c |    3 +++
 1 file changed, 3 insertions(+)
net/mptcp/subflow.c +3 -0
@@ -758,6 +758,9 @@ create_child:
 			 */
 			WRITE_ONCE(mptcp_sk(new_msk)->first, child);
 
+			if (mp_opt.deny_join_id0)
+				WRITE_ONCE(mptcp_sk(new_msk)->pm.remote_deny_join_id0, true);
+
 			/* new mpc subflow takes ownership of the newly
 			 * created mptcp socket
 			 */

Patches currently in stable-queue which might be from [email protected] are

queue-5.15/mptcp-sockopt-make-sync_socket_options-propagate-sock_keepopen.patch queue-5.15/mptcp-set-remote_deny_join_id0-on-syn-recv.patch