From 89542b8a150769ee83f6d44a6cd4e77ef00babb2 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 15 Oct 2021 14:47:07 +1100 Subject: [PATCH] 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. --- lib/dns/cache.c | 1 + lib/dns/rbtdb.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/dns/cache.c b/lib/dns/cache.c index 95f52cdd9a..41263bf256 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 4f4979f478..5814f3e6a5 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;