BUG/MINOR: quic: Really cancel the connection timer from qc_set_timer()

The ->expire field of the timer task to be cancelled was not reset
to TICK_ETERNITY.

Must be backported to 2.6 and 2.7.
This commit is contained in:
Frédéric Lécaille 2023-02-08 17:43:13 +01:00 committed by Amaury Denoyelle
parent 75c8ad5490
commit dea3298282

View File

@ -782,8 +782,11 @@ static inline void qc_set_timer(struct quic_conn *qc)
if (tick_isset(pto)) if (tick_isset(pto))
qc->timer = pto; qc->timer = pto;
out: out:
if (qc->timer_task && qc->timer != TICK_ETERNITY) { if (qc->timer_task) {
if (tick_is_expired(qc->timer, now_ms)) { if (qc->timer == TICK_ETERNITY) {
qc->timer_task->expire = TICK_ETERNITY;
}
else if (tick_is_expired(qc->timer, now_ms)) {
TRACE_DEVEL("wakeup asap timer task", QUIC_EV_CONN_STIMER, qc); TRACE_DEVEL("wakeup asap timer task", QUIC_EV_CONN_STIMER, qc);
task_wakeup(qc->timer_task, TASK_WOKEN_MSG); task_wakeup(qc->timer_task, TASK_WOKEN_MSG);
} }