From: Christopher Faulet Date: Mon, 9 Jan 2017 15:33:19 +0000 (+0100) Subject: BUG/MINOR: stream: Fix how backend-specific analyzers are set on a stream X-Git-Tag: v1.8-dev1~161 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=70e2f272127a931a7b245a95e3a022879145e1dd;p=thirdparty%2Fhaproxy.git BUG/MINOR: stream: Fix how backend-specific analyzers are set on a stream When the stream's backend was defined, the request's analyzers flag was always set to 0 if the stream had no listener. This bug was introduced with the filter API but never triggered (I think so). Because of the commit 5820a366, it is now possible to encountered it. For example, this happens when the trace filter is enabled on a SPOE backend. The fix is pretty trivial. This fix must be backported to 1.7. --- diff --git a/src/proxy.c b/src/proxy.c index 2d9f06cf58..41e40e666d 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -1156,7 +1156,7 @@ int stream_set_backend(struct stream *s, struct proxy *be) * be more reliable to store the list of analysers that have been run, * but what we do here is OK for now. */ - s->req.analysers |= be->be_req_ana & (strm_li(s) ? ~strm_li(s)->analysers : 0); + s->req.analysers |= be->be_req_ana & ~(strm_li(s) ? strm_li(s)->analysers : 0); /* If the target backend requires HTTP processing, we have to allocate * the HTTP transaction and hdr_idx if we did not have one.