From 8cabc9783aaa8309f4ec6f7dd95cd74c61ed2e61 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Tue, 12 May 2020 22:18:14 +0200 Subject: [PATCH] BUG/MEDIUM: streams: Remove SF_ADDR_SET if we're retrying due to L7 retry. In do_l7_retry(), remove the SF_ADDR_SET flag. Otherwise, assign_server_address() won't be called again, which means for 2.1 or 2.2, we will always retry to connect to the server that just failed, and for 2.0, that we will try to use to whatever the address is for the connection, probably the last server used by that connection before it was pool_free() and reallocated. This should be backported to 2.1 and 2.0. --- src/http_ana.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/http_ana.c b/src/http_ana.c index 46858c8674..f6e0eca3b2 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -1424,6 +1424,7 @@ static __inline int do_l7_retry(struct stream *s, struct stream_interface *si) res->flags &= ~(CF_READ_ERROR | CF_READ_TIMEOUT | CF_SHUTR | CF_EOI | CF_READ_NULL | CF_SHUTR_NOW); res->analysers = 0; si->flags &= ~(SI_FL_ERR | SI_FL_EXP | SI_FL_RXBLK_SHUT); + s->flags &= ~SF_ADDR_SET; stream_choose_redispatch(s); si->exp = TICK_ETERNITY; res->rex = TICK_ETERNITY; -- 2.47.3