]> git.kaiwu.me - haproxy.git/commit
MINOR: filters: Warn about ignored legacy filters for a proxy
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 27 Oct 2026 10:15:51 +0000 (11:15 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 27 Oct 2026 12:30:22 +0000 (13:30 +0100)
commit5a476c38e4fbcee8d93b2257a2e1194ed533a9ed
tree40bd62627de2164e8c4af36c427c3b65206e5cd5
parent0e31a3239ed95048f2f4331cf5d1d41b1972dd7e
MINOR: filters: Warn about ignored legacy filters for a proxy

A proxy without explicit filter declaration now gets its filter mode
deduced from the filters implied by its other directives. When it implies
filters of both kinds, it uses the filter instance mode and the
class-less ones are ignored: their configurations are legacy filter
configurations with no filter instance, so they are never evaluated and
the features they implement silently stop working on that proxy.

Such a proxy is now reported at startup, with a warning per ignored
configuration, naming the configuration and reminding the two ways to
have it evaluated: declare the filter explicitly with the "filter"
directive, which selects the legacy mode for the whole proxy, or set the
"filter-api downgrade-to-legacy" global option.

The relation between a legacy configuration and the instances of its
filter relies on the callbacks table of the filter: a filter supporting
both modes produces configurations with the same table from its legacy
keyword parser and from its class parse callback (see
flt_parse_instance_legacy()), so an instance with the same table means
the filter declared its class. The check runs after the instances are
finalized, when their configurations exist, and before the class
references are released by the flattening.

All the filters supported in-tree register their classes, so only the
third-party filters relying on an implicit declaration are concerned.
The documentation is updated accordingly, in the filters internals guide
and in the configuration manual.
doc/configuration.txt
doc/internals/api/filters.txt
src/filters.c