summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>2025-09-12 14:52:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-25 11:00:05 +0200
commit36d9f72e5d664d460601f6cfb53fe435e0348257 (patch)
tree6aa3acbab43f3093f15bf70d0455de2705c69ee4 /net
parent29a5fd482cd5953b21d25cb7bf177285cb019ca5 (diff)
downloadlinux-36d9f72e5d664d460601f6cfb53fe435e0348257.tar.gz
linux-36d9f72e5d664d460601f6cfb53fe435e0348257.tar.bz2
linux-36d9f72e5d664d460601f6cfb53fe435e0348257.zip
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 <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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/mptcp/subflow.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 0c9b9c0c277c..dfee1890c841 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -863,6 +863,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