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>
This commit is contained in:

committed by
David S. Miller

parent
1d2a6a5e4b
commit
15bb7745e9
@@ -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;
|
||||
|
Reference in New Issue
Block a user