]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Count queries to the root and TLD servers as well
authorMark Andrews <marka@isc.org>
Mon, 30 Mar 2020 03:28:58 +0000 (14:28 +1100)
committerMichał Kępień <michal@isc.org>
Tue, 19 May 2020 12:24:53 +0000 (14:24 +0200)
lib/dns/resolver.c

index 0a40859d081978f3e5f202e0ca816c3ce2105cbe..bb238704497aa1c011d775b3396bdbb017463e4c 100644 (file)
@@ -3848,16 +3848,14 @@ fctx_try(fetchctx_t *fctx, bool retrying, bool badcache) {
                }
        }
 
-       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;
        }
 
        bucketnum = fctx->bucketnum;