]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux_quic: return conn error code in debug string
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 20 Apr 2026 08:56:27 +0000 (10:56 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 27 Apr 2026 13:02:58 +0000 (15:02 +0200)
Similarly to H2, mux_quic now returns connection error code when stream
debug string is retrieved via MUX_SCTL_DBG_STR operation.

src/mux_quic.c

index 1d429d88a36b67b5c60657f21c90902fbe92477a..7757ce76fae28c896df70eda14982d84a8f2dda9 100644 (file)
@@ -4603,6 +4603,7 @@ static int qmux_sctl(struct stconn *sc, enum mux_sctl_type mux_sctl, void *outpu
        int ret = 0;
        const struct qcs *qcs = __sc_mux_strm(sc);
        const struct qcc *qcc = qcs->qcc;
+       const struct connection *conn = qcc->conn;
        union mux_sctl_dbg_str_ctx *dbg_ctx;
        struct buffer *buf;
 
@@ -4622,11 +4623,13 @@ static int qmux_sctl(struct stconn *sc, enum mux_sctl_type mux_sctl, void *outpu
                if (dbg_ctx->arg.debug_flags & MUX_SCTL_DBG_STR_L_MUXC)
                        qmux_dump_qcc_info(buf, qcc);
 
-               if (dbg_ctx->arg.debug_flags & MUX_SCTL_DBG_STR_L_CONN)
-                       chunk_appendf(buf, " conn.flg=%#08x", qcc->conn->flags);
+               if (dbg_ctx->arg.debug_flags & MUX_SCTL_DBG_STR_L_CONN) {
+                       chunk_appendf(buf, " conn.flg=%#08x conn.err_code=%u",
+                                     conn->flags, conn->err_code);
+               }
 
                if (dbg_ctx->arg.debug_flags & MUX_SCTL_DBG_STR_L_XPRT)
-                       qcc->conn->xprt->dump_info(buf, qcc->conn);
+                       conn->xprt->dump_info(buf, conn);
 
                dbg_ctx->ret.buf = *buf;
                return ret;