Skip to content

Commit 9493652

Browse files
committed
mptcp: pm: do not remove closing subflows
In a previous fix, the in-kernel path-manager has been modified not to retrigger the removal of a subflow if it was already closed, e.g. when the initial subflow is removed, but kept in the subflows list. To be complete, this fix should also skip the subflows that are in any closing state: mptcp_close_ssk() will initiate the closure, but the switch to the TCP_CLOSE state depends on the other peer. Fixes: 58e1b66 ("mptcp: pm: do not remove already closed subflows") Suggested-by: Paolo Abeni <[email protected]> Acked-by: Paolo Abeni <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 2886718 commit 9493652

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mptcp/pm_netlink.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,8 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
860860
int how = RCV_SHUTDOWN | SEND_SHUTDOWN;
861861
u8 id = subflow_get_local_id(subflow);
862862

863-
if (inet_sk_state_load(ssk) == TCP_CLOSE)
863+
if ((1 << inet_sk_state_load(ssk)) &
864+
(TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 | TCPF_CLOSING | TCPF_CLOSE))
864865
continue;
865866
if (rm_type == MPTCP_MIB_RMADDR && remote_id != rm_id)
866867
continue;

0 commit comments

Comments
 (0)