tcp: stop stack timers in tcp_switch_back_to_default()

This funcion is an alternative code path that detaches an alternative
TCP stack, missed in d2ef52ef3d.

Reviewed by:		rrs, tuexen
Differential Revision:	https://reviews.freebsd.org/D42917
Reported-by:	syzbot+186130be9f0ca5557d4e@syzkaller.appspotmail.com
Fixes:		d2ef52ef3d
This commit is contained in:
Gleb Smirnoff 2023-12-07 14:41:36 -08:00
parent 9101746a6c
commit ade05d63b7

View file

@ -542,6 +542,9 @@ tcp_switch_back_to_default(struct tcpcb *tp)
KASSERT(tp->t_fb != &tcp_def_funcblk,
("%s: called by the built-in default stack", __func__));
if (tp->t_fb->tfb_tcp_timer_stop_all != NULL)
tp->t_fb->tfb_tcp_timer_stop_all(tp);
/*
* Now, we'll find a new function block to use.
* Start by trying the current user-selected