Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit be2c5f7

Browse files
matttbegregkh
authored andcommittedFeb 8, 2025
mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted
commit e598d89 upstream. The Fixes commit mentioned this: > An MPTCP firewall blackhole can be detected if the following SYN > retransmission after a fallback to "plain" TCP is accepted. But in fact, this blackhole was detected if any following SYN retransmissions after a fallback to TCP was accepted. That's because 'mptcp_subflow_early_fallback()' will set 'request_mptcp' to 0, and 'mpc_drop' will never be reset to 0 after. This is an issue, because some not so unusual situations might cause the kernel to detect a false-positive blackhole, e.g. a client trying to connect to a server while the network is not ready yet, causing a few SYN retransmissions, before reaching the end server. Fixes: 27069e7 ("mptcp: disable active MPTCP in case of blackhole") 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>
1 parent 6ec8067 commit be2c5f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎net/mptcp/ctrl.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,9 @@ void mptcp_active_detect_blackhole(struct sock *ssk, bool expired)
405405
MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_MPCAPABLEACTIVEDROP);
406406
subflow->mpc_drop = 1;
407407
mptcp_subflow_early_fallback(mptcp_sk(subflow->conn), subflow);
408-
} else {
409-
subflow->mpc_drop = 0;
410408
}
409+
} else if (ssk->sk_state == TCP_SYN_SENT) {
410+
subflow->mpc_drop = 0;
411411
}
412412
}
413413

0 commit comments

Comments
 (0)
Please sign in to comment.