From nobody Sun May 11 22:57:14 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 7BEC417A59C;
	Mon, 12 Aug 2024 12:26:09 +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=1723465569; cv=none;
 b=SzGyXhxi06x8QOSXAhtDRLE3Ye/3qINSkwRjXx95sSIiIf4O+sS7EsEkkWUzkRNWFYiB/GHJcSIjPEUB/RRBVvdYEmBZzIB8X+Ry/TM9jgao4ZKXdrAxYfoKg9mgjmWx3yKvQAiSuHiQ8D7ot9DEdPegwybqT6C9E0MNDRL9KSs=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1723465569; c=relaxed/simple;
	bh=yO4VKYGJtuYDi8KONJLee98RYDu+2oHzjpw5rj0Q/7Y=;
	h=Subject:To:Cc:From:Date:In-Reply-To:Message-ID:MIME-Version:
	 Content-Type;
 b=sv+e4gOyH4U0jYtAqtQjduFmaeDBlFWpXov5GzZMGuLmSc/dt0kwRqyOgx0FuoxpvbD10Wg9Oaj5rwtXN8tNYg0LHIh0DjXAP4RWTiCsmfbS8dY8S+xUIuFpgwjYwhSTt0vjE6/IL3FBTbBucWLrjxWAGFts2PGEHbLTE4daopw=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
 dkim=pass (1024-bit key) header.d=linuxfoundation.org
 header.i=@linuxfoundation.org header.b=CNPABpGy;
 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="CNPABpGy"
Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2F20C4AF0D;
	Mon, 12 Aug 2024 12:26:08 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
	s=korg; t=1723465569;
	bh=yO4VKYGJtuYDi8KONJLee98RYDu+2oHzjpw5rj0Q/7Y=;
	h=Subject:To:Cc:From:Date:In-Reply-To:From;
	b=CNPABpGysiRqh/hK2IuTEadW7Bg5NL64LuFQ6QRtjGEIIwZBxIM8q5RHC7y+tQAIu
	 sm4R2TxIytidvi7ITliZnCiz31Mu23ULZPTWs1AFv7QZV2oU5Z4UfIblWRc3I8S8qT
	 dMXKsd4Pm2QTKHSs2J0HsFuhITPZU2ti5X1i0uO0=
Subject: Patch "mptcp: export local_address" has been added to the 6.1-stable
 tree
To: 
 geliang.tang@suse.com,gregkh@linuxfoundation.org,kuba@kernel.org,larysa.zaremba@intel.com,matthieu.baerts@tessares.net,matttbe@kernel.org,mptcp@lists.linux.dev
Cc: <stable-commits@vger.kernel.org>
From: <gregkh@linuxfoundation.org>
Date: Mon, 12 Aug 2024 14:25:55 +0200
In-Reply-To: <20240808153546.2315845-3-matttbe@kernel.org>
Message-ID: <2024081254-shopper-flagman-6683@gregkh>
Precedence: bulk
X-Mailing-List: mptcp@lists.linux.dev
List-Id: <mptcp.lists.linux.dev>
List-Subscribe: <mailto:mptcp+subscribe@lists.linux.dev>
List-Unsubscribe: <mailto:mptcp+unsubscribe@lists.linux.dev>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-stable: commit
X-Patchwork-Hint: ignore 
Content-Type: text/plain; charset="utf-8"


This is a note to let you know that I've just added the patch titled

    mptcp: export local_address

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=3Dlinux/kernel/git/stable/stable-queue.git=
;a=3Dsummary

The filename of the patch is:
     mptcp-export-local_address.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


From stable+bounces-66067-greg=3Dkroah.com@vger.kernel.org Thu Aug  8 17:36=
:21 2024
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Date: Thu,  8 Aug 2024 17:35:47 +0200
Subject: mptcp: export local_address
To: stable@vger.kernel.org, gregkh@linuxfoundation.org
Cc: MPTCP Upstream <mptcp@lists.linux.dev>, Geliang Tang <geliang.tang@suse=
.com>, Matthieu Baerts <matthieu.baerts@tessares.net>, Larysa Zaremba <lary=
sa.zaremba@intel.com>, Jakub Kicinski <kuba@kernel.org>, Matthieu Baerts <m=
atttbe@kernel.org>
Message-ID: <20240808153546.2315845-3-matttbe@kernel.org>

From: Geliang Tang <geliang.tang@suse.com>

commit dc886bce753cc2cf3c88ec5c7a6880a4e17d65ba upstream.

Rename local_address() with "mptcp_" prefix and export it in protocol.h.

This function will be re-used in the common PM code (pm.c) in the
following commit.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 6834097fc38c ("mptcp: pm: fix backup support in signal endpo=
ints")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/mptcp/pm_netlink.c |   17 ++++++++---------
 net/mptcp/protocol.h   |    1 +
 2 files changed, 9 insertions(+), 9 deletions(-)

--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -86,8 +86,7 @@ bool mptcp_addresses_equal(const struct
 	return a->port =3D=3D b->port;
 }
=20
-static void local_address(const struct sock_common *skc,
-			  struct mptcp_addr_info *addr)
+void mptcp_local_address(const struct sock_common *skc, struct mptcp_addr_=
info *addr)
 {
 	addr->family =3D skc->skc_family;
 	addr->port =3D htons(skc->skc_num);
@@ -122,7 +121,7 @@ static bool lookup_subflow_by_saddr(cons
 	list_for_each_entry(subflow, list, node) {
 		skc =3D (struct sock_common *)mptcp_subflow_tcp_sock(subflow);
=20
-		local_address(skc, &cur);
+		mptcp_local_address(skc, &cur);
 		if (mptcp_addresses_equal(&cur, saddr, saddr->port))
 			return true;
 	}
@@ -274,7 +273,7 @@ bool mptcp_pm_sport_in_anno_list(struct
 	struct mptcp_addr_info saddr;
 	bool ret =3D false;
=20
-	local_address((struct sock_common *)sk, &saddr);
+	mptcp_local_address((struct sock_common *)sk, &saddr);
=20
 	spin_lock_bh(&msk->pm.lock);
 	list_for_each_entry(entry, &msk->pm.anno_list, list) {
@@ -545,7 +544,7 @@ static void mptcp_pm_create_subflow_or_s
 		struct mptcp_addr_info mpc_addr;
 		bool backup =3D false;
=20
-		local_address((struct sock_common *)msk->first, &mpc_addr);
+		mptcp_local_address((struct sock_common *)msk->first, &mpc_addr);
 		rcu_read_lock();
 		entry =3D __lookup_addr(pernet, &mpc_addr, false);
 		if (entry) {
@@ -753,7 +752,7 @@ int mptcp_pm_nl_mp_prio_send_ack(struct
 		struct sock *ssk =3D mptcp_subflow_tcp_sock(subflow);
 		struct mptcp_addr_info local, remote;
=20
-		local_address((struct sock_common *)ssk, &local);
+		mptcp_local_address((struct sock_common *)ssk, &local);
 		if (!mptcp_addresses_equal(&local, addr, addr->port))
 			continue;
=20
@@ -1072,8 +1071,8 @@ int mptcp_pm_nl_get_local_id(struct mptc
 	/* The 0 ID mapping is defined by the first subflow, copied into the msk
 	 * addr
 	 */
-	local_address((struct sock_common *)msk, &msk_local);
-	local_address((struct sock_common *)skc, &skc_local);
+	mptcp_local_address((struct sock_common *)msk, &msk_local);
+	mptcp_local_address((struct sock_common *)skc, &skc_local);
 	if (mptcp_addresses_equal(&msk_local, &skc_local, false))
 		return 0;
=20
@@ -1507,7 +1506,7 @@ static int mptcp_nl_remove_id_zero_addre
 		if (list_empty(&msk->conn_list) || mptcp_pm_is_userspace(msk))
 			goto next;
=20
-		local_address((struct sock_common *)msk, &msk_local);
+		mptcp_local_address((struct sock_common *)msk, &msk_local);
 		if (!mptcp_addresses_equal(&msk_local, addr, addr->port))
 			goto next;
=20
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -618,6 +618,7 @@ void __mptcp_unaccepted_force_close(stru
=20
 bool mptcp_addresses_equal(const struct mptcp_addr_info *a,
 			   const struct mptcp_addr_info *b, bool use_port);
+void mptcp_local_address(const struct sock_common *skc, struct mptcp_addr_=
info *addr);
=20
 /* called with sk socket lock held */
 int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_addr_info =
*loc,


Patches currently in stable-queue which might be from kroah.com@vger.kernel=
.org are

queue-6.1/mptcp-pm-fix-backup-support-in-signal-endpoints.patch
queue-6.1/selftests-mptcp-join-check-backup-support-in-signal-endp.patch
queue-6.1/selftests-mptcp-join-validate-backup-in-mpj.patch
queue-6.1/mptcp-export-local_address.patch