From: Christopher Faulet Date: Mon, 5 Oct 2026 14:53:37 +0000 (+0200) Subject: MINOR: flt-decomp: Don't instantiate a filter without applicable direction X-Git-Tag: v3.5-dev9~96 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=49ac622d992fadf9ecc97a8c648dc1b3f8e5a12c;p=haproxy.git MINOR: flt-decomp: Don't instantiate a filter without applicable direction decomp_strm_init() asserted that the filter configuration was never NULL. This holds for the legacy filter configurations, which always carry the decompression direction of their proxy. But an implicit instance inherited by a proxy without the matching capability will keep its metadata while having no applicable direction, leaving its configuration NULL when the instance is finalized. Drop the assertion and handle a NULL configuration like a direction disabled with the "none" mode or without any algorithm: the filter is not attached to the stream and the instance remains as metadata. The decompression behavior is unchanged, such a filter was already ignored on every stream. --- diff --git a/src/flt_decomp.c b/src/flt_decomp.c index a7d085385..16b4c1a7e 100644 --- a/src/flt_decomp.c +++ b/src/flt_decomp.c @@ -65,9 +65,10 @@ decomp_strm_init(struct stream *s, struct filter *filter) struct decomp_dir *decomp_dir = FLT_CONF(filter); struct decomp_state *st; - BUG_ON(!decomp_dir); - - if ((decomp_dir->flags & DECOMP_DIR_FL_MODE_NONE) || !decomp_dir->algos) + /* An implicit instance inherited by an incompatible proxy has no + * applicable direction. Keep its metadata, but do not instantiate it. + */ + if (!decomp_dir || (decomp_dir->flags & DECOMP_DIR_FL_MODE_NONE) || !decomp_dir->algos) return 0; st = pool_alloc(pool_head_decomp_state);