]> git.kaiwu.me - haproxy.git/commit
MINOR: proxy: prevent deletion of backend referenced by config elements
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 6 Jan 2026 15:53:03 +0000 (16:53 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 2 Mar 2026 13:08:30 +0000 (14:08 +0100)
commit7f725f0754ca4c9b01928af80c2ee67d896fb9b2
tree3c34791aa9c425988da1098aa1fc324d1b142ce9
parent7bf3020952952bd2fbe8cce0f2bdf16bc0caf259
MINOR: proxy: prevent deletion of backend referenced by config elements

Define a new proxy flag PR_FL_NON_PURGEABLE. This is used to mark every
proxy instance explicitely referenced in the config. Such instances
cannot be deleted at runtime.

Static use_backend/default_backend rules are handled in
proxy_finalize(). Also, sample expression proxy references are protected
via smp_resolve_args().

Note that this last case also incidentally protects any proxies
referenced via a CLI "set var" expression. This should not be the case
as in this case variable value is instantly resolved so the proxy
reference is not needed anymore. This also affects dynamic servers.
doc/management.txt
include/haproxy/proxy-t.h
src/proxy.c
src/sample.c