BUG/MINOR: filters: Set right FLT_END analyser depending on channel

A bug was introduced by the commit 26eb5ea35 ("BUG/MINOR: filters: Always
set FLT_END analyser when CF_FLT_ANALYZE flag is set"). Depending on the
channel evaluated, the rigth FLT_END analyser must be set. AN_REQ_FLT_END
for the request channel and AN_RES_FLT_END for the response one.

Ths patch must be backported everywhere the above commit was backported.
This commit is contained in:
Christopher Faulet 2021-09-10 10:29:54 +02:00
parent 2d56500826
commit 949b6ca961
1 changed files with 2 additions and 2 deletions

View File

@ -537,7 +537,7 @@ flt_set_stream_backend(struct stream *s, struct proxy *be)
}
if (be->be_req_ana & AN_REQ_FLT_START_BE) {
s->req.flags |= CF_FLT_ANALYZE;
s->req.analysers |= AN_RES_FLT_END;
s->req.analysers |= AN_REQ_FLT_END;
}
if ((strm_fe(s)->fe_rsp_ana | be->be_rsp_ana) & (AN_RES_FLT_START_FE|AN_RES_FLT_START_BE)) {
s->res.flags |= CF_FLT_ANALYZE;
@ -712,7 +712,7 @@ flt_start_analyze(struct stream *s, struct channel *chn, unsigned int an_bit)
/* Set flag on channel to tell that the channel is filtered */
chn->flags |= CF_FLT_ANALYZE;
chn->analysers |= AN_RES_FLT_END;
chn->analysers |= ((chn->flags & CF_ISRESP) ? AN_RES_FLT_END : AN_REQ_FLT_END);
RESUME_FILTER_LOOP(s, chn) {
if (!(chn->flags & CF_ISRESP)) {