Message ID | 20240816-mptcp-dup-close-evt-v2-3-8a33f6617f5c@kernel.org (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | cdf9299d90492884ca59cec1a507425e962fa5a6 |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | mptcp: pm: fix re-re-create the ID 0 endpoint | expand |
Context | Check | Description |
---|---|---|
matttbe/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 16 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! ✅ |
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 0881983f505d..3784eb5e2044 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -1510,7 +1510,7 @@ static int mptcp_nl_remove_subflow_and_signal_addr(struct net *net, if (entry->flags & MPTCP_PM_ADDR_FLAG_SUBFLOW) { spin_lock_bh(&msk->pm.lock); - __mark_subflow_endp_available(msk, entry->addr.id); + __mark_subflow_endp_available(msk, list.ids[0]); spin_unlock_bh(&msk->pm.lock); } @@ -1954,7 +1954,7 @@ static void mptcp_pm_nl_fullmesh(struct mptcp_sock *msk, spin_lock_bh(&msk->pm.lock); mptcp_pm_nl_rm_subflow_received(msk, &list); - __mark_subflow_endp_available(msk, addr->id); + __mark_subflow_endp_available(msk, list.ids[0]); mptcp_pm_create_subflow_or_signal_addr(msk); spin_unlock_bh(&msk->pm.lock); }
__mark_subflow_endp_available takes the ID of the subflow, which can be 0, not the one of the entry. If it is 0, the 'local_addr_used' is not decremented as expected. Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> --- net/mptcp/pm_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)