From: Christopher Faulet Date: Fri, 17 Jun 2022 12:53:20 +0000 (+0200) Subject: BUG/MINOR: log: Properly test connection retries to fix dontlog-normal option X-Git-Tag: v2.7-dev1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a892b7f15f76272fd267441df7fb511f7ce1cb62;p=thirdparty%2Fhaproxy.git BUG/MINOR: log: Properly test connection retries to fix dontlog-normal option The commit 731c8e6cf ("MINOR: stream: Simplify retries counter calculation") introduced a regression. It broke the dontlog-normal option because the test on the connection retries counter was not updated accordingly. This patch should fix the issue #1754. It must be backported to 2.6. --- diff --git a/src/log.c b/src/log.c index e25d2e79df..304e3cb684 100644 --- a/src/log.c +++ b/src/log.c @@ -3074,8 +3074,7 @@ void strm_log(struct stream *s) /* if we don't want to log normal traffic, return now */ err = (s->flags & SF_REDISP) || ((s->flags & SF_ERR_MASK) > SF_ERR_LOCAL) || - (((s->flags & SF_ERR_MASK) == SF_ERR_NONE) && - (s->conn_retries != s->be->conn_retries)) || + (((s->flags & SF_ERR_MASK) == SF_ERR_NONE) && s->conn_retries) || ((sess->fe->mode == PR_MODE_HTTP) && s->txn && s->txn->status >= 500); if (!err && (sess->fe->options2 & PR_O2_NOLOGNORM))