]> git.kaiwu.me - haproxy.git/commit
MINOR: h3: pass the HTTP hardening checks to the h3s and h3c
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Oct 2026 10:29:45 +0000 (11:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Nov 2026 21:45:32 +0000 (22:45 +0100)
commit5e8bfc379a36364f578e5807efa6464899147c5b
tree4cf17fb4de332c7269e9e46b2eda70d8128f1db7
parentffb9641552281b36ab2f783351760023a65ef0ff
MINOR: h3: pass the HTTP hardening checks to the h3s and h3c

This adds an http_hdng_chk into h3s. In h3_attach() we preset
it to the h3c's profile's mask, which is found during h3c initialization
from the connection side's target profile (from server or bind_conf). If
no hardening profile is found ("auto" or not set), then we check the
source address of the connection. If it's a non-local IPv4/v6, then
we use the untrusted profile, otherwise we fall back to the trusted one.

Contrary to h2, h3s is allocated before parsing (like h1s), so we can
place all pre-initialization in h3_attach() without having to preset any
fields on h3s before parsing: in h3_rcv_buf(), we just have to preset
and collect http_hdng_chk, like for h1 again.
src/h3.c