]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: proxy: refactor proxy inheritance of a defaults section
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 22 Dec 2025 10:59:33 +0000 (11:59 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 6 Feb 2026 13:35:18 +0000 (14:35 +0100)
commit87ea407cce6a9993609d808fe0edd1466cae924a
tree4b2a5ae5823750bf124b7c04ede4b0ac7efb5abe
parenta8bc83bea5f63d224b9b7686d1eb076c7efffbe7
MINOR: proxy: refactor proxy inheritance of a defaults section

If a proxy is referencing a defaults instance, some checks must be
performed to ensure that inheritance will be compatible. Refcount of the
defaults instance may also be incremented if some settings cannot be
copied. This operation is performed when parsing a new proxy of defaults
section which references a defaults, either implicitely or explicitely.

This patch extracts this code into a dedicated function named
proxy_ref_defaults(). This in turn may call defaults_px_ref()
(previously called proxy_ref_defaults()) to increment its refcount.

The objective of this patch is to be able to reuse defaults inheritance
validation for dynamic backends created at runtime, outside of the
parsing code.
include/haproxy/proxy.h
src/cfgparse-listen.c
src/proxy.c