]> git.kaiwu.me - haproxy.git/commit
MINOR: filters: Add a function to find a legacy filter configuration during parsing
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 27 Oct 2026 13:07:10 +0000 (14:07 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 27 Oct 2026 13:08:45 +0000 (14:08 +0100)
commitda9a0781ce4bd8b11a1ce6c8e3783d27b8bf2a37
tree5e61a839669efec0812c316fc6c17a9ae1efb103
parentb835990ad9b222456da71d3f33f6615f24710be4
MINOR: filters: Add a function to find a legacy filter configuration during parsing

flt_find_conf() resolves a filter configuration through the filter mode
of the proxy: from the filter instances in the new mode, from the legacy
configurations otherwise. A directive parsing its own configuration
during the configuration parsing cannot use it: the mode of the proxy is
not known yet, it is deduced later from the implied filters, and in the
new mode the legacy configurations of the filters that registered no
class are ignored after the post-parsing stage.

flt_find_legacy_conf() is the parsing-time counterpart of
flt_find_conf(): it always searches the legacy filter configurations of
the proxy, in declaration order, whatever the filter mode. Like
flt_find_conf(), it filters the candidates by filter id, with an
optional match callback. It must only be used during the configuration
parsing, before the mode is deduced: the check callbacks of the rules
keep resolving their configuration with flt_find_conf(), once the
instances were finalized.
include/haproxy/filters.h
src/filters.c