]> git.kaiwu.me - haproxy.git/commit
MINOR: mux: add sctl MUX_SCTL_GET_HDNG_FOUND/FIXED to report hardening results
authorWilly Tarreau <w@1wt.eu>
Tue, 10 Nov 2026 10:19:20 +0000 (11:19 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Nov 2026 17:12:23 +0000 (18:12 +0100)
commit1a2e46898276718cc018beceb6c0429bb63bd2c8
tree4210d5d614571137aa43aa19ec5ff2036a5c6578
parent9319d597ca67b63f48e270fd3c5e25dafcba39d3
MINOR: mux: add sctl MUX_SCTL_GET_HDNG_FOUND/FIXED to report hardening results

The H1, H2 and H3 streams store in their http_hdng_chk what HTTP hardening
conditions were met (found) and what rules were enforced (fixed). This adds
two new mux stream controls to retrieve them as uint32_t, so that they can
be reported by sample fetches and logged:

  - MUX_SCTL_GET_HDNG_FOUND returns hdng_chk.found
  - MUX_SCTL_GET_HDNG_FIXED returns hdng_chk.fixed

They're implemented in the H1 and H2 muxes. The QUIC mux passes them to
the application layer's sctl() after checking that it's H3, and h3_sctl()
implements them. Other muxes return -1 as they don't support hardening.
include/haproxy/connection-t.h
src/h3.c
src/mux_h1.c
src/mux_h2.c
src/mux_quic.c