]> 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 14:50:16 +0000 (15:50 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 31 Jan 2023 15:09:47 +0000 (16:09 +0100)
This commit is identical to the preceeding patch. However, these traces
are from another patch with a different backport scope :
    56a86ddfb97d740f965503f6b5991fafa347308c
    MINOR: h3: add missing traces on closure

This must be backported up to 2.7 where above patch is scheduled.

src/h3.c

index d625807b012e790842785d2cf0c76dc48dd33ce4..ba3331120ffa411bd983363566d3b7d98403e487 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -1713,10 +1713,10 @@ static int h3_send_goaway(struct h3c *h3c)
        unsigned char data[3 * QUIC_VARINT_MAX_SIZE];
        size_t frm_len = quic_int_getsize(h3c->id_goaway);
 
-       TRACE_ENTER(H3_EV_H3C_END, h3c->qcc);
+       TRACE_ENTER(H3_EV_H3C_END, h3c->qcc->conn);
 
        if (!qcs) {
-               TRACE_ERROR("control stream not initialized", H3_EV_H3C_END, h3c->qcc);
+               TRACE_ERROR("control stream not initialized", H3_EV_H3C_END, h3c->qcc->conn);
                goto err;
        }
 
@@ -1729,18 +1729,18 @@ static int h3_send_goaway(struct h3c *h3c)
        res = mux_get_buf(qcs);
        if (!res || b_room(res) < b_data(&pos)) {
                /* Do not try forcefully to emit GOAWAY if no space left. */
-               TRACE_ERROR("cannot send GOAWAY", H3_EV_H3C_END, h3c->qcc, qcs);
+               TRACE_ERROR("cannot send GOAWAY", H3_EV_H3C_END, h3c->qcc->conn, qcs);
                goto err;
        }
 
        b_force_xfer(res, &pos, b_data(&pos));
        qcc_send_stream(qcs, 1);
 
-       TRACE_LEAVE(H3_EV_H3C_END, h3c->qcc);
+       TRACE_LEAVE(H3_EV_H3C_END, h3c->qcc->conn);
        return 0;
 
  err:
-       TRACE_DEVEL("leaving in error", H3_EV_H3C_END, h3c->qcc);
+       TRACE_DEVEL("leaving in error", H3_EV_H3C_END, h3c->qcc->conn);
        return 1;
 }
 
@@ -1780,7 +1780,7 @@ static void h3_shutdown(void *ctx)
 {
        struct h3c *h3c = ctx;
 
-       TRACE_ENTER(H3_EV_H3C_END, h3c->qcc);
+       TRACE_ENTER(H3_EV_H3C_END, h3c->qcc->conn);
 
        /* RFC 9114 5.2. Connection Shutdown
         *
@@ -1799,7 +1799,7 @@ static void h3_shutdown(void *ctx)
         */
        qcc_emit_cc_app(h3c->qcc, H3_NO_ERROR, 0);
 
-       TRACE_LEAVE(H3_EV_H3C_END, h3c->qcc);
+       TRACE_LEAVE(H3_EV_H3C_END, h3c->qcc->conn);
 }
 
 static void h3_release(void *ctx)