From c182a701fa7ef2ca88e7cfb858eaf3392c965601 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 4 Oct 2021 07:50:13 +0200 Subject: [PATCH] BUG/MEDIUM: filters: Fix a typo when a filter is attached blocking the release When a filter is attached to a stream, the wrong FLT_END analyzer is added on the request channel. AN_REQ_FLT_END must be added instead of AN_RES_FLT_END. Because of this bug, the stream may hang on the filter release stage. It seems to be ok for HTTP filters (cache & compression) in HTTP mode. But when enabled on a TCP proxy, the stream is blocked until the client or the server timeout expire because data forwarding is blocked. The stream is then prematurely aborted. This bug was introduced by commit 26eb5ea35 ("BUG/MINOR: filters: Always set FLT_END analyser when CF_FLT_ANALYZE flag is set"). The patch must be backported in all stable versions. (cherry picked from commit d28b2b2352291991190fd0693fdfd3d7430e6ddb) Signed-off-by: Christopher Faulet (cherry picked from commit 4a9db77783773955bb9d76ac7b2ef1c8c06eed28) Signed-off-by: Christopher Faulet --- src/filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filters.c b/src/filters.c index cbd0c01..34b2627 100644 --- a/src/filters.c +++ b/src/filters.c @@ -475,7 +475,7 @@ flt_stream_start(struct stream *s) } if (strm_li(s) && (strm_li(s)->analysers & AN_REQ_FLT_START_FE)) { s->req.flags |= CF_FLT_ANALYZE; - s->req.analysers |= AN_RES_FLT_END; + s->req.analysers |= AN_REQ_FLT_END; } return 0; } -- 1.7.10.4