BUG/MEDIUM: resolvers: Reset address for unresolved servers
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 23 Feb 2021 11:33:17 +0000 (12:33 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 24 Feb 2021 21:37:54 +0000 (22:37 +0100)
commit9b8c904fa1822fd8d4e46a99a5d81e1f9956bb78
treefc35da14c9d76ae61b22c0f658242966676df0d1
parent8427aa63d7664b985607d8623b6c9edcd823b1fa
BUG/MEDIUM: resolvers: Reset address for unresolved servers

If the DNS resolution failed for a server, its ip address must be
removed. Otherwise, the server is stopped but keeps its ip. This may be
confusing when the servers state are retrieved on the CLI and it may lead to
undefined behavior if HAproxy is configured to load its servers state from a
file.

This patch should be backported as far as 2.0.

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