tcp: fix SYNACK RTT estimation in Fast Open
authorYuchung Cheng <ycheng@google.com>
Thu, 24 Oct 2013 15:44:25 +0000 (08:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Oct 2013 20:50:06 +0000 (16:50 -0400)
commitbc15afa39ecc16f01c3389d15d8f6015a427fe85
tree37c5d23049eaa8ec76fd79f4a8afc13a2bdbb3c5
parente9e2a904ef0a4f46ee5c845f3ae04e62b917bb6d
tcp: fix SYNACK RTT estimation in Fast Open

tp->lsndtime may not always be the SYNACK timestamp if a passive
Fast Open socket sends data before handshake completes. And if the
remote acknowledges both the data and the SYNACK, the RTT sample
is already taken in tcp_ack(), so no need to call
tcp_update_ack_rtt() in tcp_synack_rtt_meas() aagain.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c