From: Mark Andrews Date: Tue, 27 May 2014 02:16:04 +0000 (+1000) Subject: 3862. [cleanup] Return immediately if we are not going to log the X-Git-Tag: v9.11.0a1~1602 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=9b819daddf8f4a5bd42276ee91bf9686d42f3cee;p=thirdparty%2Fbind9.git 3862. [cleanup] Return immediately if we are not going to log the message in ns_client_dumpmessage. --- diff --git a/CHANGES b/CHANGES index 340c7824ec4..54156f48fb6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3862. [cleanup] Return immediately if we are not going to log the + message in ns_client_dumpmessage. + 3861. [security] Missing isc_buffer_availablelength check results in a REQUIRE assertion when printing out a packet (CVE-2014-3859). [RT #36078] diff --git a/bin/named/client.c b/bin/named/client.c index 9c5f2ddd870..68d14a942d9 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -3198,6 +3198,9 @@ ns_client_dumpmessage(ns_client_t *client, const char *reason) { int len = 1024; isc_result_t result; + if (!isc_log_wouldlog(ns_g_lctx, ISC_LOG_DEBUG(1))) + return; + /* * Note that these are multiline debug messages. We want a newline * to appear in the log after each message.