BUG/MINOR: resolvers: Reset server address on DNS error only on status change
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 10 Mar 2021 19:31:40 +0000 (20:31 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Mar 2021 08:06:59 +0000 (09:06 +0100)
commit7c9201e08f03367db74f2fca795cb1eb35d14554
treea8de30c34b1268c360e11d6dd5e515f7aedb58cd
parente260a5892df52015fef2849766feae60942480a8
BUG/MINOR: resolvers: Reset server address on DNS error only on status change

When a DNS resolution error is detected, in snr_resolution_error_cb(), the
server address must be reset only if the server status has changed. It this
case, it means the server is set to RMAINT. Thus the server address may by
reset.

This patch fixes a bug introduced by commit d127ffa9f ("BUG/MEDIUM:
resolvers: Reset address for unresolved servers"). It must be backported as
far as 2.0.

(cherry picked from commit 5130c21fbb806a28ab4e535b700df872a80798d8)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/server.c