From: Evan Hunt Date: Thu, 26 Feb 2015 00:44:43 +0000 (-0800) Subject: [master] reduce rrl logging noise X-Git-Tag: v9.11.0a1~980 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=8378b0c190300e1652fc0ce129a4b9af4ef56e24;p=thirdparty%2Fbind9.git [master] reduce rrl logging noise 4067. [cleanup] Reduce noise from RRL when query logging is disabled. [RT #38648] --- diff --git a/CHANGES b/CHANGES index f9221315d32..30291a8b2ce 100644 --- 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] diff --git a/bin/named/client.c b/bin/named/client.c index 326f7250aeb..7a3ca3bd668 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -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); } /*