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>
(cherry picked from commit 9b8c904fa1822fd8d4e46a99a5d81e1f9956bb78)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 9005c77e73730f6ee3cc082836d657cef11f55f8)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit a3485c14fa9c826a2495dfa799a48151fd6749fc)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/server.c b/src/server.c
index e8420f4..c18eb05 100644
--- a/src/server.c
+++ b/src/server.c
@@ -4086,6 +4086,7 @@
 		return 1;
 	HA_SPIN_LOCK(SERVER_LOCK, &s->lock);
 	snr_update_srv_status(s, 0);
+	memset(&s->addr, 0, sizeof(s->addr));
 	HA_SPIN_UNLOCK(SERVER_LOCK, &s->lock);
 	return 1;
 }