From: Mark Andrews Date: Mon, 15 Oct 2012 23:21:22 +0000 (+1100) Subject: 3392. [func] Keep statistics on REFUSED responses. [RT #31412] X-Git-Tag: v9.10.0a1~804 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=71dfdcbfae32f150179f93476f9ff71b30336cb9;p=thirdparty%2Fbind9.git 3392. [func] Keep statistics on REFUSED responses. [RT #31412] --- diff --git a/CHANGES b/CHANGES index 6ce36cbcda1..19a14ad4430 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 fe5d3c67518..3adb2ffd4d3 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 d1c9c700e09..a6b938e9cca 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 256c29bb38a..0585995203f 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;