diff mbox series

[mptcp-net,v2,05/12] Squash to "mptcp: pm: fix RM_ADDR ID for the initial subflow"

Message ID 20240816-mptcp-dup-close-evt-v2-5-8a33f6617f5c@kernel.org (mailing list archive)
State Accepted, archived
Commit 09ed0d2ad73229d542cc2d7eabfafe6a51174c9e
Delegated to: Matthieu Baerts
Headers show
Series mptcp: pm: fix re-re-create the ID 0 endpoint | expand

Checks

Context Check Description
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
matttbe/shellcheck success MPTCP selftests files have not been modified
matttbe/build success Build and static analysis OK
matttbe/KVM_Validation__normal success Success! ✅
matttbe/KVM_Validation__debug success Success! ✅
matttbe/KVM_Validation__btf__only_bpftest_all_ success Success! ✅

Commit Message

Matthieu Baerts Aug. 16, 2024, 11:01 a.m. UTC
To be used with __mark_subflow_endp_available() below: the ID should be
the one of the subflow -- can be 0 -- not the one of the entry -- cannot
be 0.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 net/mptcp/pm_netlink.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index eba3c0e2ec0d..b7173163c238 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -1501,9 +1501,8 @@  static int mptcp_nl_remove_subflow_and_signal_addr(struct net *net,
 		mptcp_pm_remove_anno_addr(msk, addr, remove_subflow &&
 					  !(entry->flags & MPTCP_PM_ADDR_FLAG_IMPLICIT));
 
+		list.ids[0] = mptcp_endp_get_local_id(msk, addr);
 		if (remove_subflow) {
-			list.ids[0] = mptcp_endp_get_local_id(msk, addr);
-
 			spin_lock_bh(&msk->pm.lock);
 			mptcp_pm_nl_rm_subflow_received(msk, &list);
 			spin_unlock_bh(&msk->pm.lock);