diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -5278,6 +5278,9 @@ bbr = (struct tcp_bbr *)tp->t_fb_ptr; bbr->rc_all_timers_stopped = 1; + + tcp_hpts_remove(tp); + return (0); } diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -8213,8 +8213,12 @@ rack_stopall(struct tcpcb *tp) { struct tcp_rack *rack; + rack = (struct tcp_rack *)tp->t_fb_ptr; rack->t_timers_stopped = 1; + + tcp_hpts_remove(tp); + return (0); } diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2379,9 +2379,6 @@ INP_WLOCK_ASSERT(inp); tcp_timer_stop(tp); - if (tp->t_fb->tfb_tcp_timer_stop_all) { - tp->t_fb->tfb_tcp_timer_stop_all(tp); - } /* free the reassembly queue, if any */ tcp_reass_flush(tp); @@ -2521,9 +2518,8 @@ tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; } -#ifdef TCPHPTS - tcp_hpts_remove(tp); -#endif + if (tp->t_fb->tfb_tcp_timer_stop_all != NULL) + tp->t_fb->tfb_tcp_timer_stop_all(tp); in_pcbdrop(inp); TCPSTAT_INC(tcps_closed); if (tp->t_state != TCPS_CLOSED) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1743,10 +1743,8 @@ * Ensure the new stack takes ownership with a * clean slate on peak rate threshold. */ -#ifdef TCPHPTS - /* Assure that we are not on any hpts */ - tcp_hpts_remove(tp); -#endif + if (tp->t_fb->tfb_tcp_timer_stop_all != NULL) + tp->t_fb->tfb_tcp_timer_stop_all(tp); if (blk->tfb_tcp_fb_init) { error = (*blk->tfb_tcp_fb_init)(tp, &ptr); if (error) {