From: Evan Hunt Date: Wed, 22 May 2024 20:02:16 +0000 (-0700) Subject: attach query counter to NS fetches X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e54e9bb92c4f7d71a4b0c6946e33851c19599e5;p=thirdparty%2Fbind9.git attach query counter to NS fetches there were cases in resolver.c when queries for NS records were started without passing a pointer to the parent fetch's query counter; as a result, the max-recursion-queries quota for those queries started counting from zero, instead of sharing the limit for the parent fetch, making the quota ineffective in some cases. (cherry picked from commit d3b7e92783754e9a4ce93046fadcb96c5439a0d7) (cherry picked from commit 5ab4cae4ed5c2f7b8509a0dfcbadbc727abecf36) --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 4c621329b87..5dce41a98f5 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -7734,7 +7734,7 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) { options = fctx->options & ~DNS_FETCHOPT_TRYSTALE_ONTIMEOUT; result = dns_resolver_createfetch( fctx->res, &fctx->nsname, dns_rdatatype_ns, domain, - nsrdataset, NULL, NULL, 0, options, 0, NULL, task, + nsrdataset, NULL, NULL, 0, options, 0, fctx->qc, task, resume_dslookup, fctx, &fctx->nsrrset, NULL, &fctx->nsfetch); /* @@ -10076,8 +10076,8 @@ rctx_chaseds(respctx_t *rctx, dns_message_t *message, options = fctx->options & ~DNS_FETCHOPT_TRYSTALE_ONTIMEOUT; result = dns_resolver_createfetch( fctx->res, &fctx->nsname, dns_rdatatype_ns, NULL, NULL, NULL, - NULL, 0, options, 0, NULL, rctx->task, resume_dslookup, fctx, - &fctx->nsrrset, NULL, &fctx->nsfetch); + NULL, 0, options, 0, fctx->qc, rctx->task, resume_dslookup, + fctx, &fctx->nsrrset, NULL, &fctx->nsfetch); if (result != ISC_R_SUCCESS) { if (result == DNS_R_DUPLICATE) { result = DNS_R_SERVFAIL;