Before freeing addresses in userspace_pm_local_addr_list, RM_ADDRs for
the addresses should be sent and the subflows established with these
addresses should be deleted.
This patch invokes mptcp_pm_remove_addrs_and_subflows() in
mptcp_userspace_pm_free_local_addr_list() to remove the related
addresses and subflows.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
net/mptcp/pm_userspace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index 87cf27dc1d0a..9fc5dbd346db 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -20,6 +20,8 @@ void mptcp_userspace_pm_free_local_addr_list(struct mptcp_sock *msk)
list_splice_init(&msk->pm.userspace_pm_local_addr_list, &free_list);
spin_unlock_bh(&msk->pm.lock);
+ mptcp_pm_remove_addrs_and_subflows(msk, &free_list);
+
list_for_each_entry_safe(entry, tmp, &free_list, list) {
sock_kfree_s(sk, entry, sizeof(*entry));
}
--
2.35.3