From 10a46de620f5bd7f2cddeb3fe0fd735d316b9078 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 9 Feb 2023 18:18:45 +0100 Subject: [PATCH] BUG/MINOR: quic: fix filtering of closing connections on "show quic" Filtering of closing/draining connections on "show quic" was not properly implemented. This causes the extra argument "all" to display all connections to be without effect. This patch fixes this and restores the output of all connections. This must be backported up to 2.7. --- src/quic_conn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/quic_conn.c b/src/quic_conn.c index 631f2f2e86..c93484ca69 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -7636,13 +7636,13 @@ static int cli_parse_show_quic(char **args, char *payload, struct appctx *appctx if (!cli_has_level(appctx, ACCESS_LVL_OPER)) return 1; - if (*args[2] && strcmp(args[2], "all") == 0) - ctx->flags |= QC_CLI_FL_SHOW_ALL; - ctx->epoch = _HA_ATOMIC_FETCH_ADD(&qc_epoch, 1); ctx->thr = 0; ctx->flags = 0; + if (*args[2] && strcmp(args[2], "all") == 0) + ctx->flags |= QC_CLI_FL_SHOW_ALL; + LIST_INIT(&ctx->bref.users); return 0; @@ -7706,7 +7706,7 @@ static int cli_io_handler_dump_quic(struct appctx *appctx) continue; } - if (!ctx->flags & QC_CLI_FL_SHOW_ALL && + if (!(ctx->flags & QC_CLI_FL_SHOW_ALL) && qc->flags & (QUIC_FL_CONN_CLOSING|QUIC_FL_CONN_DRAINING)) { ctx->bref.ref = qc->el_th_ctx.n; continue;