]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Really cancel the connection timer from qc_set_timer()
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 8 Feb 2023 16:43:13 +0000 (17:43 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 17 Feb 2023 16:36:30 +0000 (17:36 +0100)
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.

src/quic_conn.c

index 503e7bb84ef3f8d201e127322b888be556be2368..419d1c67034a53ea79b47fff9e7be9d9d154130a 100644 (file)
@@ -782,8 +782,11 @@ static inline void qc_set_timer(struct quic_conn *qc)
        if (tick_isset(pto))
                qc->timer = pto;
  out:
-       if (qc->timer_task && qc->timer != TICK_ETERNITY) {
-               if (tick_is_expired(qc->timer, now_ms)) {
+       if (qc->timer_task) {
+               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);
                        task_wakeup(qc->timer_task, TASK_WOKEN_MSG);
                }