mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
mptcp: pm: do not remove already closed subflows
commit 58e1b66b4e4b8a602d3f2843e8eba00a969ecce2 upstream.
It is possible to have in the list already closed subflows, e.g. the
initial subflow has been already closed, but still in the list. No need
to try to close it again, and increments the related counters again.
Fixes: 0ee4261a36
("mptcp: implement mptcp_pm_remove_subflow")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
edfbc14a4b
commit
78b0414986
1 changed files with 2 additions and 0 deletions
|
@ -851,6 +851,8 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
|
||||||
int how = RCV_SHUTDOWN | SEND_SHUTDOWN;
|
int how = RCV_SHUTDOWN | SEND_SHUTDOWN;
|
||||||
u8 id = subflow_get_local_id(subflow);
|
u8 id = subflow_get_local_id(subflow);
|
||||||
|
|
||||||
|
if (inet_sk_state_load(ssk) == TCP_CLOSE)
|
||||||
|
continue;
|
||||||
if (rm_type == MPTCP_MIB_RMADDR && remote_id != rm_id)
|
if (rm_type == MPTCP_MIB_RMADDR && remote_id != rm_id)
|
||||||
continue;
|
continue;
|
||||||
if (rm_type == MPTCP_MIB_RMSUBFLOW && !mptcp_local_id_match(msk, id, rm_id))
|
if (rm_type == MPTCP_MIB_RMSUBFLOW && !mptcp_local_id_match(msk, id, rm_id))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue