From nobody Wed Sep 17 18:19:19 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB9692DC77B; Fri, 12 Sep 2025 12:53:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757681586; cv=none; b=Dirhg5um9sk3nB6xXVaqEzO6YRKjCNHNtmV4xxy0dKPu6uB/r3ZLhMIQO0YraHCrH14JHtvdfl8SkKUNB9Gz9789h38iFXHr3zNmWLik3t7pl7T8TGHlrZwd8vhDD/wWvI/VsY9E9UAvX0NoygkcEOLiILmFBsRrDJLzDdl2zpQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757681586; c=relaxed/simple; bh=O2z45ZEVtTEuSoxtLydb6a4AKStyGDHYl0hsAlKSGCM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ufz3MQX7Llu9Zbi/7ikTFc9yulyYVmRmEQMgSO/v1WnQjgtNTrdRxARBEk5W/o0e8itzCfWZv+UlaIAjl3BWSkbZLvZa4xtXw9IaOctj0n/hqSLhPNWpJYQaGYqyzpgja4OAUHgS2oTZX44QKz6MD+4JObkUhCCEMQeIpnCgQDY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FYj3Ztfz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FYj3Ztfz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CB78C4CEFB; Fri, 12 Sep 2025 12:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757681585; bh=O2z45ZEVtTEuSoxtLydb6a4AKStyGDHYl0hsAlKSGCM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FYj3ZtfzRypQNAoMM3zAGa0TQ8MCzpQX2kftMKSO83Qa9vU+23fCBsLgf0f1nrSRQ TrD1QFQ05a1VCSCMw2kxptEms+SywCqrMwyCwVs5ovsERuA5ogMdLO52KbnFNlQ9lF PeBm2UWr7b5xrfcKhtl4Q8SRtK4iMoln3z8PY/F+xxEh+316vlWPacRSJxe6WH5f8D Vpv1JcmzK7h3E6QNMFTRzzKiv3Eb6GLycESWYaA9PMPUS4PrPujDJ3O5dcO9NikT1n XI5OPekA81nAftiPXPC1KO3X6nmEdzI16WmAdivrO6tXGcKcCqK6WQIjUS+1/n+2UT 15oyor+MVhqEA== From: "Matthieu Baerts (NGI0)" Date: Fri, 12 Sep 2025 14:52:20 +0200 Subject: [PATCH net 1/5] mptcp: set remote_deny_join_id0 on SYN recv Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250912-net-mptcp-pm-uspace-deny_join_id0-v1-1-40171884ade8@kernel.org> References: <20250912-net-mptcp-pm-uspace-deny_join_id0-v1-0-40171884ade8@kernel.org> In-Reply-To: <20250912-net-mptcp-pm-uspace-deny_join_id0-v1-0-40171884ade8@kernel.org> To: Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Donald Hunter , Florian Westphal , Kishen Maloor , Shuah Khan , Dmytro Shytyi Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1257; i=matttbe@kernel.org; h=from:subject:message-id; bh=O2z45ZEVtTEuSoxtLydb6a4AKStyGDHYl0hsAlKSGCM=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDKOiC89v0T9ckjg5MSSh9Ivrr51PlfzPH/T/uAVBgmii /LdnHkNOkpZGMS4GGTFFFmk2yLzZz6v4i3x8rOAmcPKBDKEgYtTACbyO4iR4VoNk2NqWUmRBZsm H/ubf+Weynd2GyZIvJg7V7X+j1cnJ8M/7UBJ/2UnTzz3+u9ef/RMxf0ll8psfy/nZ6r9fkpg9tk nfAA= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 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) --- net/mptcp/subflow.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 3f1b62a9fe889ab1ac07f2a210b9de050436b37e..f31a3a79531a2e160598111d3b0= 765eee2e599fb 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -883,6 +883,10 @@ static struct sock *subflow_syn_recv_sock(const struct= sock *sk, =20 ctx->subflow_id =3D 1; owner =3D 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); =20 /* with OoO packets we can reach here without ingress --=20 2.51.0