Commit abfbedc0 authored by Tony Finch's avatar Tony Finch Committed by Mark Andrews
Browse files

Move NSID logging to its own category

It is very verbose, so it is useful to be able to filter it out.
parent 193cc42b
...@@ -6052,7 +6052,7 @@ options { ...@@ -6052,7 +6052,7 @@ options {
queries to authoritative name servers during iterative queries to authoritative name servers during iterative
resolution. If the authoritative server returns an NSID resolution. If the authoritative server returns an NSID
option in its response, then its contents are logged in option in its response, then its contents are logged in
the <command>resolver</command> category at level the <command>nsid</command> category at level
<command>info</command>. <command>info</command>.
The default is <userinput>no</userinput>. The default is <userinput>no</userinput>.
</para> </para>
......
...@@ -193,6 +193,16 @@ ...@@ -193,6 +193,16 @@
</para> </para>
</entry> </entry>
</row> </row>
<row rowsep="0">
<entry colname="1">
<para><command>nsid</command></para>
</entry>
<entry colname="2">
<para>
NSID options received from upstream servers.
</para>
</entry>
</row>
<row rowsep="0"> <row rowsep="0">
<entry colname="1"> <entry colname="1">
<para><command>queries</command></para> <para><command>queries</command></para>
......
...@@ -40,6 +40,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[]; ...@@ -40,6 +40,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[];
#define DNS_LOGCATEGORY_SPILL (&dns_categories[15]) #define DNS_LOGCATEGORY_SPILL (&dns_categories[15])
#define DNS_LOGCATEGORY_DNSTAP (&dns_categories[16]) #define DNS_LOGCATEGORY_DNSTAP (&dns_categories[16])
#define DNS_LOGCATEGORY_ZONELOAD (&dns_categories[17]) #define DNS_LOGCATEGORY_ZONELOAD (&dns_categories[17])
#define DNS_LOGCATEGORY_NSID (&dns_categories[18])
/* Backwards compatibility. */ /* Backwards compatibility. */
#define DNS_LOGCATEGORY_GENERAL ISC_LOGCATEGORY_GENERAL #define DNS_LOGCATEGORY_GENERAL ISC_LOGCATEGORY_GENERAL
......
...@@ -40,6 +40,7 @@ LIBDNS_EXTERNAL_DATA isc_logcategory_t dns_categories[] = { ...@@ -40,6 +40,7 @@ LIBDNS_EXTERNAL_DATA isc_logcategory_t dns_categories[] = {
{ "spill", 0 }, { "spill", 0 },
{ "dnstap", 0 }, { "dnstap", 0 },
{ "zoneload", 0 }, { "zoneload", 0 },
{ "nsid", 0 },
{ NULL, 0 } { NULL, 0 }
}; };
......
...@@ -6964,7 +6964,7 @@ log_nsid(isc_buffer_t *opt, size_t nsid_len, resquery_t *query, ...@@ -6964,7 +6964,7 @@ log_nsid(isc_buffer_t *opt, size_t nsid_len, resquery_t *query,
isc_sockaddr_format(&query->addrinfo->sockaddr, addrbuf, isc_sockaddr_format(&query->addrinfo->sockaddr, addrbuf,
sizeof(addrbuf)); sizeof(addrbuf));
isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER, isc_log_write(dns_lctx, DNS_LOGCATEGORY_NSID,
DNS_LOGMODULE_RESOLVER, level, DNS_LOGMODULE_RESOLVER, level,
"received NSID %s (\"%s\") from %s", buf, pbuf, addrbuf); "received NSID %s (\"%s\") from %s", buf, pbuf, addrbuf);
cleanup: cleanup:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment