]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] reduce rrl logging noise
authorEvan Hunt <each@isc.org>
Thu, 26 Feb 2015 00:44:43 +0000 (16:44 -0800)
committerEvan Hunt <each@isc.org>
Thu, 26 Feb 2015 00:44:43 +0000 (16:44 -0800)
4067. [cleanup] Reduce noise from RRL when query logging is
disabled. [RT #38648]

CHANGES
bin/named/client.c

diff --git a/CHANGES b/CHANGES
index f9221315d32c03152c0dbad9ba0cf83b7b5aba2e..30291a8b2ce7d3fcfc4e56bdcf3cee0a971cfea1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4067.  [cleanup]       Reduce noise from RRL when query logging is
+                       disabled. [RT #38648]
+
 4066.  [doc]           Reorganize options in the dig man page. [RT #38516]
 
 4065.  [test]          Additional RFC 5011 tests. [RT #38569]
index 326f7250aebe4f23d1e3c3114915c3a084d982cc..7a3ca3bd668afe3bcf7cd16ed3cef5abafd58767 100644 (file)
@@ -1308,10 +1308,15 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
                isc_boolean_t wouldlog;
                char log_buf[DNS_RRL_LOG_BUF_LEN];
                dns_rrl_result_t rrl_result;
+               int loglevel;
 
                INSIST(rcode != dns_rcode_noerror &&
                       rcode != dns_rcode_nxdomain);
-               wouldlog = isc_log_wouldlog(ns_g_lctx, DNS_RRL_LOG_DROP);
+               if (ns_g_server->log_queries)
+                       loglevel = DNS_RRL_LOG_DROP;
+               else
+                       loglevel = ISC_LOG_DEBUG(1);
+               wouldlog = isc_log_wouldlog(ns_g_lctx, loglevel);
                rrl_result = dns_rrl(client->view, &client->peeraddr,
                                     TCP_CLIENT(client),
                                     dns_rdataclass_in, dns_rdatatype_none,
@@ -1328,7 +1333,7 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
                                ns_client_log(client,
                                              NS_LOGCATEGORY_QUERY_EERRORS,
                                              NS_LOGMODULE_CLIENT,
-                                             DNS_RRL_LOG_DROP,
+                                             loglevel,
                                              "%s", log_buf);
                        }
                        /*