All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.15.y] mptcp: set remote_deny_join_id0 on SYN recv
@ 2025-09-19 23:17 Matthieu Baerts (NGI0)
  2025-09-21 17:25 ` Patch "mptcp: set remote_deny_join_id0 on SYN recv" has been added to the 5.15-stable tree gregkh
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Baerts (NGI0) @ 2025-09-19 23:17 UTC (permalink / raw)
  To: stable, gregkh, sashal
  Cc: MPTCP Upstream, Matthieu Baerts (NGI0), Mat Martineau,
	Jakub Kicinski

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.

Fixes: df377be38725 ("mptcp: add deny_join_id0 in mptcp_options_received")
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250912-net-mptcp-pm-uspace-deny_join_id0-v1-1-40171884ade8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ 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(). ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 net/mptcp/subflow.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 6bc36132d490..f67d8c98d58a 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -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
 			 */
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-21 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19 23:17 [PATCH 5.15.y] mptcp: set remote_deny_join_id0 on SYN recv Matthieu Baerts (NGI0)
2025-09-21 17:25 ` Patch "mptcp: set remote_deny_join_id0 on SYN recv" has been added to the 5.15-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.