Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 8b36f4d

Browse files
matttbegregkh
authored andcommitted
mptcp: pm: do not remove closing subflows
commit db0a37b upstream. 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") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni <pabeni@redhat.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20241008-net-mptcp-fallback-fixes-v1-4-c6fb8e93e551@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b8be15d commit 8b36f4d

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
@@ -864,7 +864,8 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
864864
int how = RCV_SHUTDOWN | SEND_SHUTDOWN;
865865
u8 id = subflow_get_local_id(subflow);
866866

867-
if (inet_sk_state_load(ssk) == TCP_CLOSE)
867+
if ((1 << inet_sk_state_load(ssk)) &
868+
(TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2 | TCPF_CLOSING | TCPF_CLOSE))
868869
continue;
869870
if (rm_type == MPTCP_MIB_RMADDR && remote_id != rm_id)
870871
continue;

0 commit comments

Comments
 (0)