From 7e64c7630ccb3344d90a95094bef61e95b819464 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 25 Feb 2015 16:45:07 -0800 Subject: [PATCH] [v9_9] reduce rrl logging noise 4067. [cleanup] Reduce noise from RRL when query logging is disabled. [RT #38648] (cherry picked from commit 8378b0c190300e1652fc0ce129a4b9af4ef56e24) --- CHANGES | 3 +++ bin/named/client.c | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 6c8ad982b6..b500a33e04 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] 4064. [contrib] dnssec-keyset.sh: Generates a specified number diff --git a/bin/named/client.c b/bin/named/client.c index f66ceda83d..d39e8e6b61 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -1171,10 +1171,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, @@ -1191,7 +1196,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); } /*