]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: mark backend conns on show quic
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 24 Nov 2025 13:24:23 +0000 (14:24 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 25 Nov 2025 13:31:27 +0000 (14:31 +0100)
Add an extra "(B)" marker when displaying a backend connection during a
"show quic". This is useful to differentiate them with the frontend side
when displaying all connections.

src/quic_cli.c

index e16067f9fe5d58396aa48fc61c7ce6dcf86b3616..e303acb0db40c1d13d0ca6e8e4370891fe61af68 100644 (file)
@@ -193,7 +193,8 @@ static void dump_quic_oneline(struct show_quic_ctx *ctx, struct quic_conn *qc)
        unsigned char cid_len;
        struct listener *l = qc->li;
 
-       ret = chunk_appendf(&trash, "%p[%02u]/%-.12s ", qc, ctx->thr,
+       ret = chunk_appendf(&trash, "%p[%02u]%s/%-.12s ", qc, ctx->thr,
+                           qc_is_back(qc) ? "(B)" : "",
                            l ? l->bind_conf->frontend->id :
                            qc->conn ? __objt_server(qc->conn->target)->id : "UNKNOWN");
 
@@ -288,7 +289,8 @@ static void dump_quic_full(struct show_quic_ctx *ctx, struct quic_conn *qc)
 
        addnl = 0;
        /* CIDs */
-       chunk_appendf(&trash, "* %p[%02u]: scid=", qc, ctx->thr);
+       chunk_appendf(&trash, "* %p[%02u]%s: scid=", qc, ctx->thr,
+                     qc_is_back(qc) ? "(B)" : "");
        for (cid_len = 0; cid_len < qc->scid.len; ++cid_len)
                chunk_appendf(&trash, "%02x", qc->scid.data[cid_len]);
        while (cid_len++ < 20)