Skip to content

Commit

Permalink
mptcp: Correct initial meta-RTO estimation after 3-way handshake
Browse files Browse the repository at this point in the history
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: b568f57 (Merge tag 'v4.4' into mptcp_trunk)
Signed-off-by: Christoph Paasch <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
(cherry picked from commit 57192ff)
Signed-off-by: Matthieu Baerts <[email protected]>
  • Loading branch information
cpaasch authored and matttbe committed Aug 11, 2017
1 parent 809d4ff commit 60611d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/mptcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 60611d3

Please sign in to comment.