From: Mark Andrews Date: Fri, 15 Oct 2021 03:47:07 +0000 (+1100) Subject: Count DNS_R_COVERINGNSEC as a cache {query}hit X-Git-Tag: v9.17.21~5^2~34 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=89542b8a150769ee83f6d44a6cd4e77ef00babb2;p=thirdparty%2Fbind9.git Count DNS_R_COVERINGNSEC as a cache {query}hit Note when synthesising answer involving wildcards we look in the cache multiple times, once for the QNAME and once for the wildcard name which is constucted by looking at the names from the covering NSEC return by the QNAME miss. --- diff --git a/lib/dns/cache.c b/lib/dns/cache.c index 95f52cdd9a1..41263bf2567 100644 --- a/lib/dns/cache.c +++ b/lib/dns/cache.c @@ -1187,6 +1187,7 @@ dns_cache_updatestats(dns_cache_t *cache, isc_result_t result) { case DNS_R_DNAME: case DNS_R_GLUE: case DNS_R_ZONECUT: + case DNS_R_COVERINGNSEC: isc_stats_increment(cache->stats, dns_cachestatscounter_queryhits); break; diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 4f4979f478e..5814f3e6a5b 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -792,6 +792,7 @@ update_cachestats(dns_rbtdb_t *rbtdb, isc_result_t result) { case DNS_R_DELEGATION: case DNS_R_NCACHENXDOMAIN: case DNS_R_NCACHENXRRSET: + case DNS_R_COVERINGNSEC: isc_stats_increment(rbtdb->cachestats, dns_cachestatscounter_hits); break;