From: Willy Tarreau Date: Wed, 2 Oct 2024 13:39:52 +0000 (+0200) Subject: BUG/MINOR: mux-h2/traces: present the correct buffer for trailers errors traces X-Git-Tag: v3.1-dev10~97 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af064b497a3d8d3548b4473252c2ae9d69d5781c;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h2/traces: present the correct buffer for trailers errors traces The local "rxbuf" buffer was passed to the trace instead of h2s->rxbuf that is used when decoding trailers. The impact is essentially the impossibility to present some buffer contents in some rare cases. It may be backported but it's unlikely that anyone will ever notice the difference. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 7ed33c912e..93066eb06e 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2910,7 +2910,7 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s) error = h2c_dec_hdrs(h2c, &h2s->rxbuf, &h2s->flags, &body_len, NULL); /* unrecoverable error ? */ if (h2c->st0 >= H2_CS_ERROR) { - TRACE_USER("Unrecoverable error decoding H2 trailers", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW|H2_EV_STRM_END, h2c->conn, 0, &rxbuf); + TRACE_USER("Unrecoverable error decoding H2 trailers", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW|H2_EV_STRM_END, h2c->conn, 0, &h2s->rxbuf); sess_log(h2c->conn->owner); goto out; } @@ -2928,7 +2928,7 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s) */ sess_log(h2c->conn->owner); h2s_error(h2s, H2_ERR_INTERNAL_ERROR); - TRACE_USER("Stream error decoding H2 trailers", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW|H2_EV_STRM_END, h2c->conn, 0, &rxbuf); + TRACE_USER("Stream error decoding H2 trailers", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW|H2_EV_STRM_END, h2c->conn, 0, &h2s->rxbuf); h2c->st0 = H2_CS_FRAME_E; goto out; }