]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: h3: fix crash due to h3 traces
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 31 Jan 2023 15:01:22 +0000 (16:01 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 31 Jan 2023 15:08:33 +0000 (16:08 +0100)
First H3 traces argument must be a connection instance or a NULL. Some
new traces were added recently with a qcc instance which caused a crash
when traces are activated.

This trace was added by the following patch :
    87f8766d3fbd10f9e8bf4902d37712612db64df5
    BUG/MEDIUM: h3: handle STOP_SENDING on control stream

This must be backported up to 2.6 along with the above patch.

src/h3.c

index 07a7e7cfcdf5ff64ba5d50c47f7795357fd88f95..d625807b012e790842785d2cf0c76dc48dd33ce4 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -1629,7 +1629,7 @@ static int h3_close(struct qcs *qcs, enum qcc_app_ops_close_side side)
         * as a connection error of type H3_CLOSED_CRITICAL_STREAM.
         */
        if (qcs == h3c->ctrl_strm || h3s->type == H3S_T_CTRL) {
-               TRACE_ERROR("closure detected on control stream", H3_EV_H3S_END, qcs->qcc, qcs);
+               TRACE_ERROR("closure detected on control stream", H3_EV_H3S_END, qcs->qcc->conn, qcs);
                qcc_emit_cc_app(qcs->qcc, H3_CLOSED_CRITICAL_STREAM, 1);
                return 1;
        }