]> git.kaiwu.me - haproxy.git/commit
MINOR: filters: Don't finalize filter instances in legacy mode
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 5 Oct 2026 07:06:24 +0000 (09:06 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 9 Oct 2026 14:17:36 +0000 (16:17 +0200)
commitd6bb27b935b705381cab0fa9796c36b7c4ea63df
tree18dad1b5474ee9a6be19977b8161f5a6599eb2ce
parentb61dca1432a9e70e0ef22ec067e66bd52c406f34
MINOR: filters: Don't finalize filter instances in legacy mode

flt_precheck_instances() finalized every instance of a proxy,
calling the parser of its filter class to produce the filter
configuration. But in legacy mode, the instances mirrored from the
implicit declarations are only metadata: the filters and the
implicit/explicit reconciliation are fully handled by the legacy
filter_configs list, checked and completed by flt_check().

Running the class parsers on these instances would be wrong: they may
modify the proxy options (e.g. the decompression parsers update the
direction flags of the proxy) or allocate filter configurations that
are never used by the legacy evaluation path. And the filter-enable and
filter-sequence directives are rejected in legacy mode, so nothing else
consumes the instances during the post-parsing stage.

Now flt_precheck_instances() returns early for a proxy using the
legacy "filter" directive. Its instances keep no filter configuration:
they are only flattened as metadata, for inspection through the CLI, and
released with the proxy. The legacy filters, including the implicit
decompression and compression filters, remain checked and initialized
as before.
src/filters.c