From: Tony Finch Date: Thu, 31 May 2018 11:24:42 +0000 (+0100) Subject: Move NSID logging to its own category X-Git-Tag: v9.13.1~16^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abfbedc0b1695cf60b5a72b1fd0c81387303656f;p=thirdparty%2Fbind9.git Move NSID logging to its own category It is very verbose, so it is useful to be able to filter it out. --- diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index ebda5e5690a..4f428a45e10 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -6052,7 +6052,7 @@ options { queries to authoritative name servers during iterative resolution. If the authoritative server returns an NSID option in its response, then its contents are logged in - the resolver category at level + the nsid category at level info. The default is no. diff --git a/doc/arm/logging-categories.xml b/doc/arm/logging-categories.xml index 9d3856d4448..25914633ab3 100644 --- a/doc/arm/logging-categories.xml +++ b/doc/arm/logging-categories.xml @@ -193,6 +193,16 @@ + + + nsid + + + + NSID options received from upstream servers. + + + queries diff --git a/lib/dns/include/dns/log.h b/lib/dns/include/dns/log.h index 6f4d557a71b..712cdfdff6f 100644 --- a/lib/dns/include/dns/log.h +++ b/lib/dns/include/dns/log.h @@ -40,6 +40,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[]; #define DNS_LOGCATEGORY_SPILL (&dns_categories[15]) #define DNS_LOGCATEGORY_DNSTAP (&dns_categories[16]) #define DNS_LOGCATEGORY_ZONELOAD (&dns_categories[17]) +#define DNS_LOGCATEGORY_NSID (&dns_categories[18]) /* Backwards compatibility. */ #define DNS_LOGCATEGORY_GENERAL ISC_LOGCATEGORY_GENERAL diff --git a/lib/dns/log.c b/lib/dns/log.c index f1d78d70270..aaa281fc78d 100644 --- a/lib/dns/log.c +++ b/lib/dns/log.c @@ -40,6 +40,7 @@ LIBDNS_EXTERNAL_DATA isc_logcategory_t dns_categories[] = { { "spill", 0 }, { "dnstap", 0 }, { "zoneload", 0 }, + { "nsid", 0 }, { NULL, 0 } }; diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 3c11ff2ee19..3b18f41254b 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -6964,7 +6964,7 @@ log_nsid(isc_buffer_t *opt, size_t nsid_len, resquery_t *query, isc_sockaddr_format(&query->addrinfo->sockaddr, addrbuf, sizeof(addrbuf)); - isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER, + isc_log_write(dns_lctx, DNS_LOGCATEGORY_NSID, DNS_LOGMODULE_RESOLVER, level, "received NSID %s (\"%s\") from %s", buf, pbuf, addrbuf); cleanup: