]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: rules: Preserve FLT_END analyzers on silent-drop action
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Mar 2020 14:10:46 +0000 (15:10 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Mar 2020 14:36:04 +0000 (15:36 +0100)
When at least a filter is attached to a stream, FLT_END analyzers must be
preserved on request and response channels.

This patch should be backported as far as 1.7.

src/proto_tcp.c

index 3629e19a5557333bfc91b7dc3e1f9227d6ceb8a1..cc07792febcc5f29a4ecbe0bdd6b63d4b9ee0c24 100644 (file)
@@ -1264,9 +1264,8 @@ static enum act_return tcp_exec_action_silent_drop(struct act_rule *rule, struct
        if (strm) {
                channel_abort(&strm->req);
                channel_abort(&strm->res);
-               strm->req.analysers = 0;
-               strm->res.analysers = 0;
-               _HA_ATOMIC_ADD(&strm->be->be_counters.denied_req, 1);
+               strm->req.analysers &= AN_REQ_FLT_END;
+               strm->res.analysers &= AN_RES_FLT_END;
                if (!(strm->flags & SF_ERR_MASK))
                        strm->flags |= SF_ERR_PRXCOND;
                if (!(strm->flags & SF_FINST_MASK))