Message-ID: Content-Type: text/plain; charset="utf-8" From: bconry@isc.org X-RT-Interface: Web Content-Disposition: inline Content-Transfer-Encoding: binary To: bind9-public@isc.org Subject: XML zone zonestats emitted with either wrong type or wrong names MIME-Version: 1.0 Date: Wed, 06 Sep 2017 19:03:57 +0000 X-Mailer: MIME-tools 5.508 (Entity 5.508) X-RT-Original-Encoding: utf-8 Content-Length: 1558 Looking at current git master In bin/named/statschannel.c in zone_xmlrender() in the block: zonestats = dns_zone_getrequeststats(zone); rcvquerystats = dns_zone_getrcvquerystats(zone); if (statlevel == dns_zonestat_full && zonestats != NULL) { TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counters")); TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", ISC_XMLCHAR "rcode")); result = dump_counters(zonestats, isc_statsformat_xml, writer, NULL, nsstats_xmldesc, dns_nsstatscounter_max, nsstats_index, nsstat_values, ISC_STATSDUMP_VERBOSE); if (result != ISC_R_SUCCESS) goto error; /* counters type="rcode"*/ TRY0(xmlTextWriterEndElement(writer)); } paying attention only to the two statements: TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "type", ISC_XMLCHAR "rcode")); result = dump_counters(zonestats, isc_statsformat_xml, writer, NULL, nsstats_xmldesc, dns_nsstatscounter_max, nsstats_index, nsstat_values, ISC_STATSDUMP_VERBOSE); Assuming that these stats are emitted, the "counters" container for them is given a "type" attribute with value "rcode", yet the individual counters will be given names from nsstats_xmldesc, which does not describe rcodes. I have not traced things to identify when these stats will be emitted (if ever) and what the actual contents of zonestats *mean*, but I can say confidently that /at least/ one of "rcode" or nsstats_xmldesc is wrongfully applied to zonestats, and possibly even both.