]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: count a proto error when rejecting a stream on parsing error
authorWilly Tarreau <w@1wt.eu>
Wed, 22 Apr 2026 11:51:10 +0000 (13:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 22 Apr 2026 13:57:20 +0000 (15:57 +0200)
The proxy error counter was not updated in h2c_frt_handle_headers() in
case of failure to decode a HEADERS frame. Make sure to keep it updated.
This can be backported to all stable versions.

src/mux_h2.c

index 99a6be282d6e41f7aaee9a98784e9a976fd4fbab..473e1809757d970da3648fa9990b1c6fb237e43b 100644 (file)
@@ -3648,6 +3648,7 @@ static struct h2s *h2c_frt_handle_headers(struct h2c *h2c, struct h2s *h2s)
                }
 
                /* recoverable stream error (e.g. too large request) */
+               HA_ATOMIC_INC(&h2c->px_counters->strm_proto_err);
                h2_sess_log_strm(h2c->conn->owner);
                TRACE_USER("rcvd unparsable H2 request", H2_EV_RX_FRAME|H2_EV_RX_HDR|H2_EV_STRM_NEW|H2_EV_STRM_END, h2c->conn, h2s, &rxbuf);
                goto strm_err;