[master] reduce rrl logging noise

4067.	[cleanup]	Reduce noise from RRL when query logging is
			disabled. [RT #38648]
This commit is contained in:
Evan Hunt 2015-02-25 16:44:43 -08:00
parent 82c091b7a4
commit 8378b0c190
2 changed files with 10 additions and 2 deletions

View file

@ -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]

View 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);
}
/*