Message ID | 20240906083401.1771515-2-matttbe@kernel.org (mailing list archive) |
---|---|
State | Mainlined, archived |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | [5.15.y] mptcp: pm: do not remove already closed subflows | expand |
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index c77e596c477c..6df7d62f6b44 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -763,6 +763,9 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk, int how = RCV_SHUTDOWN | SEND_SHUTDOWN; u8 id = subflow->local_id; + if (inet_sk_state_load(ssk) == TCP_CLOSE) + continue; + if (rm_type == MPTCP_MIB_RMADDR) id = subflow->remote_id;