From 70e99bb27a925e8b303e9177715a6b4a15f04388 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 13 Aug 2025 23:11:29 -0700 Subject: [PATCH] result could be set incorrectly in validated() during a recent refactoring of validated(), a line was removed, causing 'result' to be left unchanged. this wasted time continuing to try to validate when a non-recoverable error had occured, and caused the wrong reason to be logged in add_bad(). --- lib/dns/resolver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 3d1fb3e147..546a6ee2e8 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -5435,8 +5435,8 @@ validated(void *arg) { FCTXTRACE("validation failed"); inc_stats(res, dns_resstatscounter_valfail); fctx->valfail++; - fctx->vresult = val->result; - if (fctx->vresult != DNS_R_BROKENCHAIN) { + result = fctx->vresult = val->result; + if (result != DNS_R_BROKENCHAIN) { if (val->rdataset != NULL) { delete_rrset(fctx, val->name, val->type, val->sigrdataset != NULL);