From: Matthieu Baerts (NGI0) Date: Fri, 12 Sep 2025 12:52:20 +0000 (+0200) Subject: mptcp: set remote_deny_join_id0 on SYN recv X-Git-Tag: v6.12.49~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f5b09cc84e0372181f3940f7c533bd7d9d6d20e;p=thirdparty%2Fkernel%2Fstable.git mptcp: set remote_deny_join_id0 on SYN recv [ Upstream commit 96939cec994070aa5df852c10fad5fc303a97ea3 ] 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 Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250912-net-mptcp-pm-uspace-deny_join_id0-v1-1-40171884ade8@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index a05f201d194c5..17d1a9d8b0e98 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -888,6 +888,10 @@ create_child: ctx->subflow_id = 1; owner = mptcp_sk(ctx->conn); + + if (mp_opt.deny_join_id0) + WRITE_ONCE(owner->pm.remote_deny_join_id0, true); + mptcp_pm_new_connection(owner, child, 1); /* with OoO packets we can reach here without ingress