aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorNeal Cardwell <ncardwell@google.com>2012-09-22 13:03:47 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-22 23:15:25 -0400
commit30099b2e9b3a1f88250d31472edf2b6d6f0a7d8b (patch)
tree2aeded9a3d62bec2312880332883a4b4aa9a4067 /net/ipv4/tcp_input.c
parent5894bab7f452d61941a6d3215dec43221ac0be4b (diff)
tcp: TCP Fast Open Server - record retransmits after 3WHS
When recording the number of SYNACK retransmits for servers using TCP Fast Open, fix the code to ensure that we copy over the retransmit count from the request_sock after we receive the ACK that completes the 3-way handshake. The story here is similar to that of SYNACK RTT measurements. Previously we were always doing this in tcp_v4_syn_recv_sock(). However, for TCP Fast Open connections tcp_v4_conn_req_fastopen() calls tcp_v4_syn_recv_sock() at the time we receive the SYN. So for TFO we must copy the final SYNACK retransmit count in tcp_rcv_state_process(). Note that copying over the SYNACK retransmit count will give us the correct count since, as is mentioned in a comment in tcp_retransmit_timer(), before we receive an ACK for our SYN-ACK a TFO passive connection does not retransmit anything else (e.g., data or FIN segments). Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 36e069a1f47b..e037697c3b77 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5985,6 +5985,8 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
5985 */ 5985 */
5986 if (req) { 5986 if (req) {
5987 tcp_synack_rtt_meas(sk, req); 5987 tcp_synack_rtt_meas(sk, req);
5988 tp->total_retrans = req->retrans;
5989
5988 reqsk_fastopen_remove(sk, req, false); 5990 reqsk_fastopen_remove(sk, req, false);
5989 } else { 5991 } else {
5990 /* Make sure socket is routed, for 5992 /* Make sure socket is routed, for