Skip to content
  • Andrew Vagin's avatar
    tcp: don't apply tsoffset if rcv_tsecr is zero · e3e12028
    Andrew Vagin authored
    
    
    The zero value means that tsecr is not valid, so it's a special case.
    
    tsoffset is used to customize tcp_time_stamp for one socket.
    tsoffset is usually zero, it's used when a socket was moved from one
    host to another host.
    
    Currently this issue affects logic of tcp_rcv_rtt_measure_ts. Due to
    incorrect value of rcv_tsecr, tcp_rcv_rtt_measure_ts sets rto to
    TCP_RTO_MAX.
    
    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: default avatarCyrill Gorcunov <gorcunov@openvz.org>
    Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e3e12028