lkml.org 
[lkml]   [2020]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.5 012/367] tcp: clear tp->delivered in tcp_disconnect()
    Date
    From: Eric Dumazet <edumazet@google.com>

    [ Upstream commit 2fbdd56251b5c62f96589f39eded277260de7267 ]

    tp->delivered needs to be cleared in tcp_disconnect().

    tcp_disconnect() is rarely used, but it is worth fixing it.

    Fixes: ddf1af6fa00e ("tcp: new delivery accounting")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Acked-by: Yuchung Cheng <ycheng@google.com>
    Acked-by: Neal Cardwell <ncardwell@google.com>
    Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/ipv4/tcp.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/net/ipv4/tcp.c
    +++ b/net/ipv4/tcp.c
    @@ -2621,6 +2621,7 @@ int tcp_disconnect(struct sock *sk, int
    tp->snd_cwnd = TCP_INIT_CWND;
    tp->snd_cwnd_cnt = 0;
    tp->window_clamp = 0;
    + tp->delivered = 0;
    tp->delivered_ce = 0;
    tcp_set_ca_state(sk, TCP_CA_Open);
    tp->is_sack_reneg = 0;

    \
     
     \ /
      Last update: 2020-02-10 13:53    [W:4.269 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site