]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: server-state: Don't load server-state file for disabled backends
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Mar 2021 15:35:26 +0000 (16:35 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Mar 2021 15:49:10 +0000 (16:49 +0100)
commit6f69110191971ab6505ed9edb278f64d404a3a60
treec58deda1e35e5228a882c71e96c28f9736d468c0
parent2ec4e3c1acf95bcdc56028bbefe1a355c457b978
BUG/MINOR: server-state: Don't load server-state file for disabled backends

Recent changes on the server-state file loading have introduced a
regression. HAproxy crashes if a backend with no server-state file is
disabled in the configuration. Indeed, configuration of such backends is not
finalized. Thus many fields are not defined.

To fix the bug, disabled backends must be ignored. In addition a BUG_ON()
has been added to verify the proxy mode regarding the server-state file. It
must be specified (none, global or local) for enabled backends.

No backport needed.
src/server_state.c