From: Amaury Denoyelle Date: Thu, 26 Mar 2026 14:03:04 +0000 (+0100) Subject: MINOR: mux-quic: prepare traces support for QMux X-Git-Tag: v3.4-dev8~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce4aab4fdb39d16e3cfc2731d4ce1d6ff9e3a47b;p=thirdparty%2Fhaproxy.git MINOR: mux-quic: prepare traces support for QMux Ensure mux-quic traces will be compatible with the new QMux protocol. This is necessary as the quic_conn element is accessed to display some transport information. Use conn_is_quic() to protect these accesses. --- diff --git a/src/qmux_trace.c b/src/qmux_trace.c index 58cd45d28..b5d85e2ea 100644 --- a/src/qmux_trace.c +++ b/src/qmux_trace.c @@ -143,18 +143,19 @@ static char *qcc_app_st_to_str(const enum qcc_app_st st) void qmux_dump_qcc_info(struct buffer *msg, const struct qcc *qcc) { - const struct quic_conn *qc = qcc->conn->handle.qc; + const struct quic_conn *qc = conn_is_quic(qcc->conn) ? qcc->conn->handle.qc : NULL; chunk_appendf(msg, " qcc=%p(%c)", qcc, (qcc->flags & QC_CF_IS_BACK) ? 'B' : 'F'); - if (qcc->conn->handle.qc) + if (qc) chunk_appendf(msg, " qc=%p", qcc->conn->handle.qc); chunk_appendf(msg, " .st=%s .sc=%llu .hreq=%llu .flg=0x%04x", qcc_app_st_to_str(qcc->app_st), (ullong)qcc->nb_sc, (ullong)qcc->nb_hreq, qcc->flags); - chunk_appendf(msg, " .tx=%llu %llu/%llu bwnd=%llu/%llu", - (ullong)qcc->tx.fc.off_soft, (ullong)qcc->tx.fc.off_real, (ullong)qcc->tx.fc.limit, - (ullong)qcc->tx.buf_in_flight, (ullong)qc->path->cwnd); + chunk_appendf(msg, " .tx=%llu %llu/%llu", + (ullong)qcc->tx.fc.off_soft, (ullong)qcc->tx.fc.off_real, (ullong)qcc->tx.fc.limit); + if (qc) + chunk_appendf(msg, " bwnd=%llu/%llu", (ullong)qcc->tx.buf_in_flight, (ullong)qc->path->cwnd); } void qmux_dump_qcs_info(struct buffer *msg, const struct qcs *qcs)