FAILED: patch "[PATCH] mptcp: update local address flags when setting it" failed to apply to 6.6-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x e0266319413d5d687ba7b6df7ca99e4b9724a4f2
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024111758-headcount-securely-4e49@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From e0266319413d5d687ba7b6df7ca99e4b9724a4f2 Mon Sep 17 00:00:00 2001
From: Geliang Tang <[email protected]>
Date: Tue, 12 Nov 2024 20:18:33 +0100
Subject: [PATCH] mptcp: update local address flags when setting it
Just like in-kernel pm, when userspace pm does set_flags, it needs to send out MP_PRIO signal, and also modify the flags of the corresponding address entry in the local address list. This patch implements the missing logic.
Traverse all address entries on userspace_pm_local_addr_list to find the local address entry, if bkup is true, set the flags of this entry with FLAG_BACKUP, otherwise, clear FLAG_BACKUP.
net/mptcp/pm_userspace.c +12 -0
@@ -560,6 +560,7 @@ int mptcp_userspace_pm_set_flags(struct sk_buff *skb, struct genl_info *info)struct nlattr *token = info->attrs[MPTCP_PM_ATTR_TOKEN ];struct nlattr *attr = info->attrs[MPTCP_PM_ATTR_ADDR ];struct net *net =sock_net (skb->sk); +struct mptcp_pm_addr_entry *entry;struct mptcp_sock *msk;int ret = -EINVAL ;struct sock *sk;
@@ -601,6 +602,17 @@ int mptcp_userspace_pm_set_flags(struct sk_buff *skb, struct genl_info *info)if (loc.flags &MPTCP_PM_ADDR_FLAG_BACKUP ) bkup =1 ; +spin_lock_bh (&msk->pm.lock); +list_for_each_entry (entry, &msk->pm.userspace_pm_local_addr_list, list) { +if (mptcp_addresses_equal (&entry->addr, &loc.addr, false)) { +if (bkup) + entry->flags |=MPTCP_PM_ADDR_FLAG_BACKUP ; +else + entry->flags &= ~MPTCP_PM_ADDR_FLAG_BACKUP ; + } + } +spin_unlock_bh (&msk->pm.lock); +lock_sock (sk); ret =mptcp_pm_nl_mp_prio_send_ack (msk, &loc.addr, &rem.addr, bkup);release_sock (sk);