lkml.org 
[lkml]   [2013]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 29/46] tcp: initialize rcv_tstamp for restored sockets
    Date
    3.10-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Andrew Vagin <avagin@openvz.org>

    [ Upstream commit c7781a6e3c4a9a17e144ec2db00ebfea327bd627 ]

    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.

    Reported-by: Cyrill Gorcunov <gorcunov@openvz.org>
    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>
    Signed-off-by: Andrey Vagin <avagin@openvz.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/ipv4/tcp_output.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/net/ipv4/tcp_output.c
    +++ b/net/ipv4/tcp_output.c
    @@ -2808,6 +2808,8 @@ void tcp_connect_init(struct sock *sk)

    if (likely(!tp->repair))
    tp->rcv_nxt = 0;
    + else
    + tp->rcv_tstamp = tcp_time_stamp;
    tp->rcv_wup = tp->rcv_nxt;
    tp->copied_seq = tp->rcv_nxt;




    \
     
     \ /
      Last update: 2013-09-13 08:21    [W:6.199 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site