diff options
author | Eric Dumazet <edumazet@google.com> | 2017-03-22 16:10:21 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-22 23:39:42 +0100 |
commit | 15bb7745e94a665caf42bfaabf0ce062845b533b (patch) | |
tree | 47e25470f2814b8baa614b09409747ebc8104359 /net/ipv4/tcp_minisocks.c | |
parent | genetlink: fix counting regression on ctrl_dumpfamily() (diff) | |
download | linux-15bb7745e94a665caf42bfaabf0ce062845b533b.tar.xz linux-15bb7745e94a665caf42bfaabf0ce062845b533b.zip |
tcp: initialize icsk_ack.lrcvtime at session start time
icsk_ack.lrcvtime has a 0 value at socket creation time.
tcpi_last_data_recv can have bogus value if no payload is ever received.
This patch initializes icsk_ack.lrcvtime for active sessions
in tcp_finish_connect(), and for passive sessions in
tcp_create_openreq_child()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 7e16243cdb58..65c0f3d13eca 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -460,6 +460,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, newtp->mdev_us = jiffies_to_usecs(TCP_TIMEOUT_INIT); minmax_reset(&newtp->rtt_min, tcp_time_stamp, ~0U); newicsk->icsk_rto = TCP_TIMEOUT_INIT; + newicsk->icsk_ack.lrcvtime = tcp_time_stamp; newtp->packets_out = 0; newtp->retrans_out = 0; |