]> git.kaiwu.me - haproxy.git/commit
CLEANUP: sink: initialize and finalize the implicit forward proxy
authorWilly Tarreau <w@1wt.eu>
Wed, 26 Aug 2026 13:47:54 +0000 (15:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 26 Aug 2026 13:56:09 +0000 (15:56 +0200)
commitb563ab7460d755c39569e585fea696513dab2bee
tree314463cf896470592104f003e65d74ca4b38b241
parent3bacb1c30475b668469a4b8d65ca0e4cc00f92ff
CLEANUP: sink: initialize and finalize the implicit forward proxy

sink_new_from_logger() builds a forward proxy by hand from a POST_CHECK
hook, that is after check_config_validity() has walked over
sink_proxies_list. As a result, contrary to the proxy of a "ring"
section, that one was neither passed to proxy_init_per_thr() nor to
proxy_finalize(), and kept running with px->per_tgrp left NULL, no
load-balancing setup at all (lbprm.algo, lbprm.ops and the lbprm lock
were never initialized), and its server left in SRV_ST_STOPPED with a
zero effective weight.

It still works surprisingly well but for how long... Let's just make
sure the freshly created server is completely initialized like any
other one so as to avoid susprises in the future like the max-reuse
one.

This shouldn't be backported as it might reveal other issues in older
code.
src/sink.c