Skip to content

Commit 58e1b66

Browse files
matttbePaolo Abeni
authored andcommitted
mptcp: pm: do not remove already closed subflows
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: 0ee4261 ("mptcp: implement mptcp_pm_remove_subflow") Cc: [email protected] Reviewed-by: Mat Martineau <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 76a2d83 commit 58e1b66

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/mptcp/pm_netlink.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,8 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
838838
int how = RCV_SHUTDOWN | SEND_SHUTDOWN;
839839
u8 id = subflow_get_local_id(subflow);
840840

841+
if (inet_sk_state_load(ssk) == TCP_CLOSE)
842+
continue;
841843
if (rm_type == MPTCP_MIB_RMADDR && remote_id != rm_id)
842844
continue;
843845
if (rm_type == MPTCP_MIB_RMSUBFLOW && id != rm_id)

0 commit comments

Comments
 (0)