From: Amaury Denoyelle Date: Thu, 9 Feb 2023 17:18:45 +0000 (+0100) Subject: BUG/MINOR: quic: fix filtering of closing connections on "show quic" X-Git-Tag: v2.8-dev4~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10a46de620f5bd7f2cddeb3fe0fd735d316b9078;p=thirdparty%2Fhaproxy.git 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. --- 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;