]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
result could be set incorrectly in validated()
authorEvan Hunt <each@isc.org>
Thu, 14 Aug 2025 06:11:29 +0000 (23:11 -0700)
committerEvan Hunt <each@isc.org>
Thu, 14 Aug 2025 23:07:54 +0000 (16:07 -0700)
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

index 3d1fb3e14721a0b27068fe5c4720d518cff7573d..546a6ee2e845b2c8efed279632e793d1679940db 100644 (file)
@@ -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);