From mboxrd@z Thu Jan 1 00:00:00 1970 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 8DBAF3EDE4A; Tue, 12 May 2026 18:01:37 +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=1778608897; cv=none; b=V7r3DjCfZaYw1559RcXw5WsVG0BIp/F2DL17VuP2QjxxAu6J7ZstD2W5AHn5JGIg5ct/2LE9QOpwFaAPRMBOMjEEmo5NTtj4fFhwU4HV/ZuARQWrA3hVM4pusVGFS2sJ8DrmdmEx/DIfVdoQrTcorhTRdJqBABECzVJzb36BYIA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778608897; c=relaxed/simple; bh=kRCCVQvoPnMwNhLAWnEfADcSKB9bzXOlsHnKIf3PhCM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SAQIyHxd2ulSHVLADu1EDPtBk40L9lp4VCMGuWl8VWbpvyio1/M9jgU7fLmtWFb0Y+E/pdGdW0TbUzdNHq8qo9EVzK0bp0Apqv44Nx8wJrpSD9pPJG0u4Fj8I1QLSEJBaG7jni5dBrICfYS7oTuXS/Y8HpEArvO1MXHdXgWf3Aw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qAjtG+gA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qAjtG+gA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C79DCC2BCF5; Tue, 12 May 2026 18:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778608897; bh=kRCCVQvoPnMwNhLAWnEfADcSKB9bzXOlsHnKIf3PhCM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qAjtG+gA13lwNH1TqI5iy7Vx/D5axg+MqE9t6PCX+jfzIpytoOKDR9QhK6UxDdN6i eJygcp2HCu7vHTJnugWPmnXZS5nYANHcwSDIa5CR7VUGI0PC6Pw05mcwC4ZR1brZSt sIOVi9Oq1qrR9X7K26B8uJbuL2ZIvx9A+OJsb5/o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mat Martineau , "Matthieu Baerts (NGI0)" , Jakub Kicinski Subject: [PATCH 6.18 216/270] mptcp: pm: kernel: correctly retransmit ADD_ADDR ID 0 Date: Tue, 12 May 2026 19:40:17 +0200 Message-ID: <20260512173942.992995193@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260512173938.452574370@linuxfoundation.org> References: <20260512173938.452574370@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthieu Baerts (NGI0) commit b12014d2d36eaed4e4bec5f1ac7e91110eeb100d upstream. When adding the ADD_ADDR to the list, the address including the IP, port and ID are copied. On the other hand, when the endpoint corresponds to the one from the initial subflow, the ID is set to 0, as specified by the MPTCP protocol. The issue is that the ID was reset after having copied the ID in the ADD_ADDR entry. So the retransmission was done, but using a different ID than the initial one. Fixes: 8b8ed1b429f8 ("mptcp: pm: reuse ID 0 after delete and re-add") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20260505-net-mptcp-pm-fixes-7-1-rc3-v1-1-fca8091060a4@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/mptcp/pm_kernel.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- a/net/mptcp/pm_kernel.c +++ b/net/mptcp/pm_kernel.c @@ -336,6 +336,8 @@ static void mptcp_pm_create_subflow_or_s /* check first for announce */ if (msk->pm.add_addr_signaled < endp_signal_max) { + u8 endp_id; + /* due to racing events on both ends we can reach here while * previous add address is still running: if we invoke now * mptcp_pm_announce_addr(), that will fail and the @@ -349,19 +351,20 @@ static void mptcp_pm_create_subflow_or_s if (!select_signal_address(pernet, msk, &local)) goto subflow; + /* Special case for ID0: set the correct ID */ + endp_id = local.addr.id; + if (endp_id == msk->mpc_endpoint_id) + local.addr.id = 0; + /* If the alloc fails, we are on memory pressure, not worth * continuing, and trying to create subflows. */ if (!mptcp_pm_alloc_anno_list(msk, &local.addr)) return; - __clear_bit(local.addr.id, msk->pm.id_avail_bitmap); + __clear_bit(endp_id, msk->pm.id_avail_bitmap); msk->pm.add_addr_signaled++; - /* Special case for ID0: set the correct ID */ - if (local.addr.id == msk->mpc_endpoint_id) - local.addr.id = 0; - mptcp_pm_announce_addr(msk, &local.addr, false); mptcp_pm_addr_send_ack(msk);