From 75a4284babf50feecac17f9b32d07509b6c519ed Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 7 May 2021 08:19:30 +0200 Subject: [PATCH] BUG/MINOR: stream: properly clear the previous error mask on L7 retries The cleanup of the previous error was incorrect on L7 retries, it would OR two values while they're part of an enum, leaving some bits set. Depending on the errors it was possible to occasionally see an internal error ("I" flag) being logged. This should be backported as far as 2.0, though the do_l7_retry() function in in proto_htx.c in older versions. --- src/http_ana.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http_ana.c b/src/http_ana.c index 7c5e3ff66..bed8d09b4 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -1316,7 +1316,7 @@ static __inline int do_l7_retry(struct stream *s, struct stream_interface *si) res->to_forward = 0; res->analyse_exp = TICK_ETERNITY; res->total = 0; - s->flags &= ~(SF_ERR_SRVTO | SF_ERR_SRVCL); + s->flags &= ~SF_ERR_MASK; si_release_endpoint(&s->si[1]); b_reset(&req->buf);