diff --git a/CHANGES b/CHANGES index 6ce36cbcda..19a14ad443 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +3392. [func] Keep statistics on REFUSED responses. [RT #31412] + 3391. [bug] A DNSKEY lookup that encountered a CNAME failed. [RT #31262] diff --git a/bin/named/statschannel.c b/bin/named/statschannel.c index fe5d3c6751..3adb2ffd4d 100644 --- a/bin/named/statschannel.c +++ b/bin/named/statschannel.c @@ -280,6 +280,7 @@ init_desc(void) { "QryRTT" DNS_RESOLVER_QRYRTTCLASS4STR "+"); SET_RESSTATDESC(nfetch, "active fetches", "NumFetch"); SET_RESSTATDESC(buckets, "bucket size", "BucketSize"); + SET_RESSTATDESC(refused, "REFUSED received", "REFUSED"); INSIST(i == dns_resstatscounter_max); /* Initialize adb statistics */ diff --git a/lib/dns/include/dns/stats.h b/lib/dns/include/dns/stats.h index d1c9c700e0..a6b938e9cc 100644 --- a/lib/dns/include/dns/stats.h +++ b/lib/dns/include/dns/stats.h @@ -65,8 +65,9 @@ enum { dns_resstatscounter_disprequdp = 31, dns_resstatscounter_dispreqtcp = 32, dns_resstatscounter_buckets = 33, + dns_resstatscounter_refused = 34, - dns_resstatscounter_max = 34, + dns_resstatscounter_max = 35, /* * DNSSEC stats. diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 256c29bb38..0585995203 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -6833,6 +6833,9 @@ resquery_response(isc_task_t *task, isc_event_t *event) { case dns_rcode_formerr: inc_stats(fctx->res, dns_resstatscounter_formerr); break; + case dns_rcode_refused: + inc_stats(fctx->res, dns_resstatscounter_refused); + break; default: inc_stats(fctx->res, dns_resstatscounter_othererror); break;