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.
This commit is contained in:
Olivier Houchard 2020-05-12 22:18:14 +02:00
parent c9c475e40d
commit 8cabc9783a

View File

@ -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;