Skip to content

Commit c13c48c

Browse files
edumazetkuba-moo
authored andcommitted
tcp: clear tp->total_retrans in tcp_disconnect()
total_retrans needs to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet <[email protected]> Cc: SeongJae Park <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 91a7d4b commit c13c48c

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
@@ -2626,6 +2626,7 @@ int tcp_disconnect(struct sock *sk, int flags)
26262626
tcp_set_ca_state(sk, TCP_CA_Open);
26272627
tp->is_sack_reneg = 0;
26282628
tcp_clear_retrans(tp);
2629+
tp->total_retrans = 0;
26292630
inet_csk_delack_init(sk);
26302631
/* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0
26312632
* issue in __tcp_select_window()

0 commit comments

Comments
 (0)