Skip to content

Commit e598d89

Browse files
matttbePaolo Abeni
authored andcommitted
mptcp: blackhole only if 1st SYN retrans w/o MPC is accepted
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: [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 3effcc0 commit e598d89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/mptcp/ctrl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,9 @@ void mptcp_active_detect_blackhole(struct sock *ssk, bool expired)
418418
MPTCP_INC_STATS(net, MPTCP_MIB_MPCAPABLEACTIVEDROP);
419419
subflow->mpc_drop = 1;
420420
mptcp_subflow_early_fallback(mptcp_sk(subflow->conn), subflow);
421-
} else {
422-
subflow->mpc_drop = 0;
423421
}
422+
} else if (ssk->sk_state == TCP_SYN_SENT) {
423+
subflow->mpc_drop = 0;
424424
}
425425
}
426426

0 commit comments

Comments
 (0)