tcp: initialize rcv_tstamp for restored sockets
authorAndrew Vagin <avagin@openvz.org>
Tue, 27 Aug 2013 08:20:40 +0000 (12:20 +0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Aug 2013 19:11:11 +0000 (15:11 -0400)
commitc7781a6e3c4a9a17e144ec2db00ebfea327bd627
tree5af6a05e09c913dd36f8a37e78bc4c2e52d70121
parent282a1dffc1b9976cdf1b0eea3f6f68fda23a7c7e
tcp: initialize rcv_tstamp for restored sockets

u32 rcv_tstamp;     /* timestamp of last received ACK */

Its value used in tcp_retransmit_timer, which closes socket
if the last ack was received more then TCP_RTO_MAX ago.

Currently rcv_tstamp is initialized to zero and if tcp_retransmit_timer
is called before receiving a first ack, the connection is closed.

This patch initializes rcv_tstamp to a timestamp, when a socket was
restored.

Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Reported-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c