From 60611d3bbfd83339ed7ec2dca8b2af30004e963d Mon Sep 17 00:00:00 2001 From: Christoph Paasch Date: Tue, 1 Aug 2017 22:19:47 -0700 Subject: [PATCH] mptcp: Correct initial meta-RTO estimation after 3-way handshake Since the merge with v4.4, we call mptcp_set_rto coming from tcp_synack_rtt_meas() in mptcp_check_req_master() before the subflow has transitioned to ESTABLISHED state. This means that we will be ignoring the RTT-estimation from the initial subflow that has been measured during the 3-way handshake. This patch fixes this by accepting RTT-estimations from subflows that are in SYN_RECV-state. Subflows in the MPTCP's subflow-list will only be in there if their 3-way handshake has completed, so it's safe to do this here. Fixes: b568f578baca (Merge tag 'v4.4' into mptcp_trunk) Signed-off-by: Christoph Paasch Signed-off-by: Matthieu Baerts (cherry picked from commit 57192ffda92ba5e1a23b4df944623b504d2c208d) Signed-off-by: Matthieu Baerts --- include/net/mptcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/mptcp.h b/include/net/mptcp.h index b868c5383d9e04..6dcc297b912234 100644 --- a/include/net/mptcp.h +++ b/include/net/mptcp.h @@ -1219,7 +1219,7 @@ static inline void mptcp_set_rto(struct sock *sk) return; mptcp_for_each_sk(tp->mpcb, sk_it) { - if (mptcp_sk_can_send(sk_it) && + if ((mptcp_sk_can_send(sk_it) || sk->sk_state == TCP_SYN_RECV) && inet_csk(sk_it)->icsk_rto > max_rto) max_rto = inet_csk(sk_it)->icsk_rto; }