Skip to content

Commit 2fbdd56

Browse files
edumazetkuba-moo
authored andcommitted
tcp: clear tp->delivered in tcp_disconnect()
tp->delivered needs to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: ddf1af6 ("tcp: new delivery accounting") Signed-off-by: Eric Dumazet <[email protected]> Cc: Yuchung Cheng <[email protected]> Cc: Neal Cardwell <[email protected]> Acked-by: Yuchung Cheng <[email protected]> Acked-by: Neal Cardwell <[email protected]> Acked-by: Soheil Hassas Yeganeh <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c13c48c commit 2fbdd56

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/ipv4/tcp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2622,6 +2622,7 @@ int tcp_disconnect(struct sock *sk, int flags)
26222622
tp->snd_cwnd = TCP_INIT_CWND;
26232623
tp->snd_cwnd_cnt = 0;
26242624
tp->window_clamp = 0;
2625+
tp->delivered = 0;
26252626
tp->delivered_ce = 0;
26262627
tcp_set_ca_state(sk, TCP_CA_Open);
26272628
tp->is_sack_reneg = 0;

0 commit comments

Comments
 (0)