]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Count DNS_R_COVERINGNSEC as a cache {query}hit
authorMark Andrews <marka@isc.org>
Fri, 15 Oct 2021 03:47:07 +0000 (14:47 +1100)
committerPetr Špaček <pspacek@isc.org>
Thu, 2 Dec 2021 13:18:40 +0000 (14:18 +0100)
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.

lib/dns/cache.c
lib/dns/rbtdb.c

index 95f52cdd9a12b80e65af5bfe6e29780036552e08..41263bf25670f8ab16d764d05640e404c83ad45a 100644 (file)
@@ -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;
index 4f4979f478e76a2acd71b18ebee72d498f89d35c..5814f3e6a5b9193801d0ea49e0487aa724a50dd2 100644 (file)
@@ -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;