From 78b992f7bf1bf68dbd97782dcf4b89ea19203181 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 6 Mar 2020 15:23:18 +0100 Subject: [PATCH] BUG/MINOR: rules: Increment be_counters if backend is assigned for a silent-drop Backend counters must be incremented only if a backend was already assigned to the stream (when the stream exists). Otherwise, it means we are still on the frontend side. This patch may be backported as far as 1.6. (cherry picked from commit ddc005ae5783b6479292156b97db7b6fbdabf6a3) Signed-off-by: Willy Tarreau --- src/proto_tcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 9211170..97d3abc 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -1357,6 +1357,8 @@ static enum act_return tcp_exec_action_silent_drop(struct act_rule *rule, struct channel_abort(&strm->res); strm->req.analysers &= AN_REQ_FLT_END; strm->res.analysers &= AN_RES_FLT_END; + if (strm->flags & SF_BE_ASSIGNED) + _HA_ATOMIC_ADD(&strm->be->be_counters.denied_req, 1); if (!(strm->flags & SF_ERR_MASK)) strm->flags |= SF_ERR_PRXCOND; if (!(strm->flags & SF_FINST_MASK)) -- 1.7.10.4