From e260a5892df52015fef2849766feae60942480a8 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 10 Mar 2021 15:39:16 +0100 Subject: [PATCH] BUG/MINOR: resolvers: Consider server to have no IP on DNS resolution error When an error is received for a DNS resolution, for instance a NXDOMAIN error, the server must be considered to have no address when its status is updated, not the opposite. Concretly, because this parameter is not used on error path in snr_update_srv_status(), there is no impact. This patch must be backported as far as 1.8. (cherry picked from commit bd0227c1096ecc9e11da315c399b178b16ad7a9d) Signed-off-by: Christopher Faulet --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index c01c948..f721254 100644 --- a/src/server.c +++ b/src/server.c @@ -3995,7 +3995,7 @@ int snr_resolution_error_cb(struct dns_requester *requester, int error_code) if (!s) return 1; HA_SPIN_LOCK(SERVER_LOCK, &s->lock); - snr_update_srv_status(s, 0); + snr_update_srv_status(s, 1); memset(&s->addr, 0, sizeof(s->addr)); HA_SPIN_UNLOCK(SERVER_LOCK, &s->lock); return 1; -- 1.7.10.4