]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: haload: fix stale global variables affecting URL allocations
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 30 Jul 2026 12:43:19 +0000 (14:43 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 31 Jul 2026 10:06:12 +0000 (12:06 +0200)
commit54344a45c0285e1c33a9c6de2277b65d54ef91a7
treed4aabb0b42cea420df9ef79e4a968f15ac95d56a
parentc0f110ac9cdcfaf276d7b346e31a3a2097569856
BUG/MINOR: haload: fix stale global variables affecting URL allocations

hld_alloc_url() relied on global variables (alpn, h2c) set during
command-line parsing. When processing multiple URLs, values retained in
these globals by previous URLs persisted and affected subsequent
allocations. This corrupted the configuration of newly allocated
URLs—especially QUIC URLs, which require "h3" ALPN and no h2c—causing
connection failures.

Fix this by passing is_quic, ALPN, and h2c explicitly as parameters
from haproxy_init_args() to hld_alloc_url(), ensuring each URL is
constructed with its appropriate parameters instead of inheriting
stale global state.
src/haload_init.c