]> git.kaiwu.me - haproxy.git/commit
MINOR: filters: Reject mixing legacy and filter-* directives
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 30 Sep 2026 16:44:05 +0000 (18:44 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:35 +0000 (16:17 +0200)
commit3721b3b1c6e137cc061dd6a9e757a22170da7b95
tree59b66c021eaa933a0a84d4529f340c2da3bc98b3
parentdb18ddaa2441d47cb23205f6dae474f12301c3d2
MINOR: filters: Reject mixing legacy and filter-* directives

Do not allow filter-config, filter-enable/filter-disable or filter-sequence
together with an explicit legacy filter directive in the same proxy,
regardless of parsing order. A legacy filter must also be rejected when the
proxy inherits explicit filter-* directives from its defaults section.

Mark configurations created by the legacy filter parser so implicit legacy
filters do not select a mode. Share the explicit-instance/directive check
with proxy_ref_defaults(), ignoring FLT_INST_F_IMPLICIT instances on both
sides. Check for conflicts before invoking parsers or recording directives.

Add native VTC coverage for all four directives, both declaration orders,
inherited directives and response-only instances. Also check that each mode
permits multiple declarations, different proxies can use different modes,
and implicit cache filters can coexist with either explicit syntax.
include/haproxy/filters-t.h
include/haproxy/filters.h
reg-tests/filters/config-mode.vtc [new file with mode: 0644]
src/filters.c
src/haload.c
src/proxy.c