diff options
author | Yuchung Cheng <ycheng@google.com> | 2019-04-30 00:46:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-01 17:47:54 +0200 |
commit | 9e450c1ecb027417c99eba651413d2a6ba6ffc1f (patch) | |
tree | f399effe5bad9cdffefb6485555f269016233c71 /net/ipv4/tcp_output.c | |
parent | tcp: undo initial congestion window on false SYN timeout (diff) | |
download | linux-9e450c1ecb027417c99eba651413d2a6ba6ffc1f.tar.xz linux-9e450c1ecb027417c99eba651413d2a6ba6ffc1f.zip |
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.c | 4 |
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, skb->skb_mstamp_ns = cookie_init_timestamp(req); else #endif + { skb->skb_mstamp_ns = tcp_clock_ns(); + if (!tcp_rsk(req)->snt_synack) /* Timestamp first SYNACK */ + tcp_rsk(req)->snt_synack = tcp_skb_timestamp_us(skb); + } #ifdef CONFIG_TCP_MD5SIG rcu_read_lock(); |