]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use query counters in validator code
authorMatthijs Mekking <matthijs@isc.org>
Fri, 6 Dec 2024 15:41:15 +0000 (16:41 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Mon, 9 Dec 2024 09:55:32 +0000 (10:55 +0100)
Commit af7db8951364a89c468eda1535efb3f53adc2c1f as part of #4141 was
supposed to apply the 'max-recursion-queries' quota to validator
queries, but the counter was never actually passed on to
dns_resolver_createfetch(). This has been fixed, and the global query
counter ('max-query-count', per client request) is now also added.

lib/dns/validator.c

index 92ab963ffeb55e872e686fa30a525749e7c326c2..b1e06f2c5d0fa1b6cfcf9bcbbf787da966b37149 100644 (file)
@@ -939,8 +939,8 @@ create_fetch(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type,
        dns_validator_ref(val);
        result = dns_resolver_createfetch(
                val->view->resolver, name, type, NULL, NULL, NULL, NULL, 0,
-               fopts, 0, NULL, NULL, val->loop, callback, val, &val->frdataset,
-               &val->fsigrdataset, &val->fetch);
+               fopts, 0, val->qc, val->gqc, val->loop, callback, val,
+               &val->frdataset, &val->fsigrdataset, &val->fetch);
        if (result != ISC_R_SUCCESS) {
                dns_validator_detach(&val);
        }