Skip to content

Commit da06d80

Browse files
matttbeintel-lab-lkp
authored andcommitted
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. Suggested-by: Paolo Abeni <[email protected]> Fixes: Fixes: 58e1b66 ("mptcp: pm: do not remove already closed subflows") Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 6b336f0 commit da06d80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mptcp/pm_netlink.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,8 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
862862
int how = RCV_SHUTDOWN | SEND_SHUTDOWN;
863863
u8 id = subflow_get_local_id(subflow);
864864

865-
if (inet_sk_state_load(ssk) == TCP_CLOSE)
865+
if ((1 << inet_sk_state_load(ssk)) &
866+
(TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 | TCPF_CLOSING | TCPF_CLOSE))
866867
continue;
867868
if (rm_type == MPTCP_MIB_RMADDR && remote_id != rm_id)
868869
continue;

0 commit comments

Comments
 (0)