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.
This commit is contained in:
Mark Andrews 2021-10-15 14:47:07 +11:00 committed by Petr Špaček
parent e5ce159b5b
commit 89542b8a15
No known key found for this signature in database
GPG key ID: ABD587CDF06581AE
2 changed files with 2 additions and 0 deletions

View 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;

View 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;