aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/tcp_ipv6.c
diff options
context:
space:
mode:
authorOctavian Purdila <octavian.purdila@intel.com>2014-06-25 10:09:51 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-27 18:53:35 -0400
commitaa27fc501850030fb5d1ee705feb836ee6a21f2a (patch)
treeb91842d21980aa13fb980dcf0891ced53a342738 /net/ipv6/tcp_ipv6.c
parent57b47553f65e12e2e4f1608168374b0e651de843 (diff)
tcp: tcp_v[46]_conn_request: fix snt_synack initialization
Commit 016818d07 (tcp: TCP Fast Open Server - take SYNACK RTT after completing 3WHS) changes the code to only take a snt_synack timestamp when a SYNACK transmit or retransmit succeeds. This behaviour is later broken by commit 843f4a55e (tcp: use tcp_v4_send_synack on first SYN-ACK), as snt_synack is now updated even if tcp_v4_send_synack fails. Also, commit 3a19ce0ee (tcp: IPv6 support for fastopen server) misses the required IPv6 updates for 016818d07. This patch makes sure that snt_synack is updated only when the SYNACK trasnmit/retransmit succeeds, for both IPv4 and IPv6. Cc: Cardwell <ncardwell@google.com> Cc: Daniel Lee <longinus00@gmail.com> Cc: Yuchung Cheng <ycheng@google.com> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r--net/ipv6/tcp_ipv6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 08ae3da0db4a..a962455471ba 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -497,6 +497,8 @@ static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst,
497 skb_set_queue_mapping(skb, queue_mapping); 497 skb_set_queue_mapping(skb, queue_mapping);
498 err = ip6_xmit(sk, skb, fl6, np->opt, np->tclass); 498 err = ip6_xmit(sk, skb, fl6, np->opt, np->tclass);
499 err = net_xmit_eval(err); 499 err = net_xmit_eval(err);
500 if (!tcp_rsk(req)->snt_synack && !err)
501 tcp_rsk(req)->snt_synack = tcp_time_stamp;
500 } 502 }
501 503
502done: 504done:
@@ -1100,7 +1102,6 @@ have_isn:
1100 goto drop_and_free; 1102 goto drop_and_free;
1101 1103
1102 tcp_rsk(req)->snt_isn = isn; 1104 tcp_rsk(req)->snt_isn = isn;
1103 tcp_rsk(req)->snt_synack = tcp_time_stamp;
1104 tcp_openreq_init_rwin(req, sk, dst); 1105 tcp_openreq_init_rwin(req, sk, dst);
1105 fastopen = !want_cookie && 1106 fastopen = !want_cookie &&
1106 tcp_try_fastopen(sk, skb, req, &foc, dst); 1107 tcp_try_fastopen(sk, skb, req, &foc, dst);