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 DE424134AC; Mon, 12 Aug 2024 16:23:17 +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=1723479798; cv=none; b=JaEXfoN66Jb7eRUWRGz3JjoanLV82DWMKbq8/xZ3aIZJdrS9DN9ARcYVfJxhM7g0P2Rcxohevr0pX0JGEKVQM9+YX0kOs4W8KuDnVdvw61IhIQePXSyu7MdLTLk3pgD9oD0zqtdstepqpclNQeYgxUNZb8ae9yymPQR5k+e4ocQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723479798; c=relaxed/simple; bh=3JHZSSRjeMlPogryc3hYnQa9CwC4zZjT2wRhV0/WPrY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rGTbIk63dGRKxP1LhgfZm8qNX6KvBMRgb2vX/DbWBFZALY5979Uw/RDIS9Mc7ek08OVXLB1pTbdvPEKvNXUJzT43JHKCwcaqdg9EkglLMZcOa7XlKdbwlEyTKnEum2mLBF8O9VkY7Fs7bl6EUY/mhzo0LNJc7XDZZjo3XWC8THI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vuSFWZMO; 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="vuSFWZMO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C207C4AF13; Mon, 12 Aug 2024 16:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723479797; bh=3JHZSSRjeMlPogryc3hYnQa9CwC4zZjT2wRhV0/WPrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vuSFWZMOi2jZhiqN2lGdPujx4srWaLd09zkciK/dpmhgyxR2i+zjbxo9spaBiWk9I Vv9PeWmNZ5FWFbIx9vzkp1I0Q0iElKlSMKf4NmEKwGaG3RE68uYKq6IEF+f9eNwx6U dN812HBaLcE9Br59ltzcFQDe25kx3MpWgzLc2J08= 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.6 167/189] mptcp: fully established after ADD_ADDR echo on MPJ Date: Mon, 12 Aug 2024 18:03:43 +0200 Message-ID: <20240812160138.574831253@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240812160132.135168257@linuxfoundation.org> References: <20240812160132.135168257@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthieu Baerts (NGI0) commit d67c5649c1541dc93f202eeffc6f49220a4ed71d upstream. Before this patch, receiving an ADD_ADDR echo on the just connected MP_JOIN subflow -- initiator side, after the MP_JOIN 3WHS -- was resulting in an MP_RESET. That's because only ACKs with a DSS or ADD_ADDRs without the echo bit were allowed. Not allowing the ADD_ADDR echo after an MP_CAPABLE 3WHS makes sense, as we are not supposed to send an ADD_ADDR before because it requires to be in full established mode first. For the MP_JOIN 3WHS, that's different: the ADD_ADDR can be sent on a previous subflow, and the ADD_ADDR echo can be received on the recently created one. The other peer will already be in fully established, so it is allowed to send that. We can then relax the conditions here to accept the ADD_ADDR echo for MPJ subflows. Fixes: 67b12f792d5e ("mptcp: full fully established support after ADD_ADDR") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20240731-upstream-net-20240731-mptcp-endp-subflow-signal-v1-1-c8a9b036493b@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/mptcp/options.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -958,7 +958,8 @@ static bool check_fully_established(stru if (subflow->remote_key_valid && (((mp_opt->suboptions & OPTION_MPTCP_DSS) && mp_opt->use_ack) || - ((mp_opt->suboptions & OPTION_MPTCP_ADD_ADDR) && !mp_opt->echo))) { + ((mp_opt->suboptions & OPTION_MPTCP_ADD_ADDR) && + (!mp_opt->echo || subflow->mp_join)))) { /* subflows are fully established as soon as we get any * additional ack, including ADD_ADDR. */