]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Wrong idle timer expiration (during 20s)
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 4 Apr 2023 12:31:49 +0000 (14:31 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 4 Apr 2023 16:24:28 +0000 (18:24 +0200)
This this commit, this is ->idle_expire of quic_conn struct which must
be taken into an account to display the idel timer task expiration value:

     MEDIUM: quic: Ack delay implementation

Furthermore, this value was always zero until now_ms has wrapped (20 s after
the start time) due to this commit:
     MEDIUM: clock: force internal time to wrap early after boot

Do not rely on the value of now_ms compared to ->idle_expire to display the
difference but use ticks_remain() to compute it.

Must be backported to 2.7 where "show quic" has already been backported.

src/quic_conn.c

index 22da2076065eb2c523bf442f8b6a303c6b4dc341..23e5f28b52f3e23095bf82e70f63a1c8308c5b87 100644 (file)
@@ -8358,9 +8358,9 @@ static int cli_io_handler_dump_quic(struct appctx *appctx)
                else
                        chunk_appendf(&trash, "mux=released                                  ");
 
-               expire = qc->idle_timer_task->expire;
+               expire = qc->idle_expire;
                chunk_appendf(&trash, "expire=%02ds ",
-                             expire > now_ms ? (expire - now_ms) / 1000 : 0);
+                             TICKS_TO_MS(tick_remain(now_ms, expire)) / 1000);
 
                chunk_appendf(&trash, "\n");