]> git.kaiwu.me - haproxy.git/commit
MINOR: filters: Restrict defaults inheritance with explicit filter directives
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 30 Sep 2026 16:36:55 +0000 (18:36 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:35 +0000 (16:17 +0200)
commitdb18ddaa2441d47cb23205f6dae474f12301c3d2
tree9d82c9818a6fa290134ed52875820d8eab0e933e
parentf967e3756f7eec67945a9443f0f4f80df6ccbd2b
MINOR: filters: Restrict defaults inheritance with explicit filter directives

In proxy_ref_defaults(), reject listen and defaults sections inheriting from
a defaults section containing explicit filter instances, enable/disable
entries or sequence directives. Frontends and backends must not share such a
defaults section either; record the first inheriting proxy's type in the
defaults capabilities, as already done for TCP/HTTP rules.

Inspect instances on both request and response sides, ignoring those marked
FLT_INST_F_IMPLICIT. Class references alone do not imply an explicit filter
configuration. Multiple proxies of the same type remain allowed, and
implicit instances alone do not restrict inheritance. Perform these checks
before copying instances.

Update the named-defaults acceptance test to use two frontends. Add native
VTC coverage for explicit instances and each directive independently,
including response-only instances, both frontend/backend declaration orders,
listen and defaults rejection, and allowed inheritance.
reg-tests/filters/defaults-inheritance.vtc [new file with mode: 0644]
reg-tests/filters/defaults.vtc
src/proxy.c