]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: resolvers: Purge answer items when a SRV resolution triggers an error
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 10 Mar 2021 14:46:46 +0000 (15:46 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Mar 2021 16:41:28 +0000 (17:41 +0100)
When a SRV request trigger an error, if we decide to handle the error
because last_valid duration is expired, the answer list may be purged. All
items are considered as obsolete.

src/server.c

index 3b4d41e50a6a380ae3f484f48a884d8864ca75cb..412bd42e56141995e31c48532075f4fb5d93deb5 100644 (file)
@@ -3293,6 +3293,8 @@ int srvrq_resolution_error_cb(struct resolv_requester *requester, int error_code
                HA_SPIN_UNLOCK(SERVER_LOCK, &s->lock);
        }
 
+       resolv_purge_resolution_answer_records(res);
+
        return 1;
 }