From 71dfdcbfae32f150179f93476f9ff71b30336cb9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 16 Oct 2012 10:21:22 +1100 Subject: [PATCH] 3392. [func] Keep statistics on REFUSED responses. [RT #31412] --- CHANGES | 2 ++ bin/named/statschannel.c | 1 + lib/dns/include/dns/stats.h | 3 ++- lib/dns/resolver.c | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) 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;