]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: proxy: always initialize the default settings after init
authorWilly Tarreau <w@1wt.eu>
Mon, 13 Nov 2023 08:17:05 +0000 (09:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 Nov 2023 08:17:05 +0000 (09:17 +0100)
commitcf07cb96be70cbe979c6cf21aefd134894cf743f
tree069eaea2d3fbba5e55ee08cdf722817529251e54
parent79aa638238721026e8dffc4aa057facf0859e81a
BUG/MEDIUM: proxy: always initialize the default settings after init

The proxy's initialization is rather odd. First, init_new_proxy() is
called to zero all the lists and certain values, except those that can
come from defaults, which are initialized by proxy_preset_defaults().
The default server settings are also only set there.

This results in these settings not to be set for a number of internal
proxies that do not explicitly call proxy_preset_defaults() after
allocation, such as sink and log forwarders.

This was revealed by last commit 79aa63823 ("MINOR: server: always
initialize pp_tlvs for default servers") which crashes in log parsers
when applied to certain proxies which did not initialize their default
servers.

In theory this should be backported, however it would be desirable to
wait a bit before backporting it, in case certain parts would rely on
these elements not being initialized.
src/cfgparse-listen.c
src/hlua.c
src/http_client.c
src/proxy.c