aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2019-04-29 18:46:15 -0400
committerDavid S. Miller <davem@davemloft.net>2019-05-01 11:47:54 -0400
commit9e450c1ecb027417c99eba651413d2a6ba6ffc1f (patch)
treef399effe5bad9cdffefb6485555f269016233c71 /net/ipv4/tcp_output.c
parent7c1f08154c4e34d10be41156375ce2b8ab591b0f (diff)
tcp: better SYNACK sent timestamp
Detecting spurious SYNACK timeout using timestamp option requires recording the exact SYNACK skb timestamp. Previously the SYNACK sent timestamp was stamped slightly earlier before the skb was transmitted. This patch uses the SYNACK skb transmission timestamp directly. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 32061928b054..0c4ed66dc1bf 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -3247,7 +3247,11 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
3247 skb->skb_mstamp_ns = cookie_init_timestamp(req); 3247 skb->skb_mstamp_ns = cookie_init_timestamp(req);
3248 else 3248 else
3249#endif 3249#endif
3250 {
3250 skb->skb_mstamp_ns = tcp_clock_ns(); 3251 skb->skb_mstamp_ns = tcp_clock_ns();
3252 if (!tcp_rsk(req)->snt_synack) /* Timestamp first SYNACK */
3253 tcp_rsk(req)->snt_synack = tcp_skb_timestamp_us(skb);
3254 }
3251 3255
3252#ifdef CONFIG_TCP_MD5SIG 3256#ifdef CONFIG_TCP_MD5SIG
3253 rcu_read_lock(); 3257 rcu_read_lock();