From 034b7e34525ecd9d2b4e5a9d38c2ebbabd471204 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 30 Mar 2020 14:28:58 +1100 Subject: [PATCH] Count queries to the root and TLD servers as well --- lib/dns/resolver.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 4fdcbd821d..07276adbdb 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -4164,16 +4164,14 @@ fctx_try(fetchctx_t *fctx, bool retrying, bool badcache) { return; } - if (dns_name_countlabels(&fctx->domain) > 2) { - result = isc_counter_increment(fctx->qc); - if (result != ISC_R_SUCCESS) { - isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER, - DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), - "exceeded max queries resolving '%s'", - fctx->info); - fctx_done(fctx, DNS_R_SERVFAIL, __LINE__); - return; - } + result = isc_counter_increment(fctx->qc); + if (result != ISC_R_SUCCESS) { + isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER, + DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), + "exceeded max queries resolving '%s'", + fctx->info); + fctx_done(fctx, DNS_R_SERVFAIL, __LINE__); + return; } fctx_increference(fctx);