]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] change RRL log category 'query-errors'
authorEvan Hunt <each@isc.org>
Tue, 21 May 2013 19:20:54 +0000 (12:20 -0700)
committerEvan Hunt <each@isc.org>
Tue, 21 May 2013 19:20:54 +0000 (12:20 -0700)
3575. [func] Changed the logging category for RRL events from
'queries' to 'query-errors'. [RT #33540]

CHANGES
bin/named/client.c
bin/named/query.c
doc/arm/Bv9ARM-book.xml
lib/dns/rrl.c

diff --git a/CHANGES b/CHANGES
index a2b06f5a09b02a4dc0e5c301d55fabc95801f928..f824667db7fd8a84122673986fd8f00c67a2e0a7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3575.  [func]          Changed the logging category for RRL events from
+                       'queries' to 'query-errors'. [RT #33540]
+
 3574.  [doc]           The 'hostname' keyword was missing from server-id
                        description in the named.conf man page. [RT #33476]
 
index 1276dcbdc0e77c5d1e832058391a29330106e4db..801e0e321de0dec27f124573c766e3a6c1141aa2 100644 (file)
@@ -1235,8 +1235,7 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
 
                INSIST(rcode != dns_rcode_noerror &&
                       rcode != dns_rcode_nxdomain);
-               wouldlog = (ns_g_server->log_queries &&
-                           isc_log_wouldlog(ns_g_lctx, DNS_RRL_LOG_DROP));
+               wouldlog = isc_log_wouldlog(ns_g_lctx, DNS_RRL_LOG_DROP);
                rrl_result = dns_rrl(client->view, &client->peeraddr,
                                     TCP_CLIENT(client),
                                     dns_rdataclass_in, dns_rdatatype_none,
@@ -1250,7 +1249,8 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
                         * NS_LOGCATEGORY_RRL.
                         */
                        if (wouldlog) {
-                               ns_client_log(client, NS_LOGCATEGORY_QUERIES,
+                               ns_client_log(client,
+                                             NS_LOGCATEGORY_QUERY_EERRORS,
                                              NS_LOGMODULE_CLIENT,
                                              DNS_RRL_LOG_DROP,
                                              "%s", log_buf);
index c6c58581dc7304c1608aea2c76a671239e05e2e5..75d8d7ded66ededa893dea3236dff7fd1f372f2f 100644 (file)
@@ -6323,9 +6323,10 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
                         * in QryDropped while slipped responses are counted
                         * with other truncated responses in RespTruncated.
                         */
-                       if (wouldlog && ns_g_server->log_queries) {
-                               ns_client_log(client, NS_LOGCATEGORY_QUERIES,
-                                             NS_LOGMODULE_CLIENT,
+                       if (wouldlog) {
+                               ns_client_log(client,
+                                             NS_LOGCATEGORY_QUERY_EERRORS,
+                                             NS_LOGMODULE_QUERY,
                                              DNS_RRL_LOG_DROP,
                                              "%s", log_buf);
                        }
index f61bbb76bd2c559a231e2d10da6028a4a20e06f9..c6d03a21b3604650d8dd718cc975410165c766c0 100644 (file)
@@ -4938,9 +4938,7 @@ category notify { null; };
                    </para>
                    <para>
                      Rate limiting of individual requests
-                     is logged in the <command>queries</command> category
-                     and can be controlled with the
-                     <command>querylog</command> option.
+                     is logged in the <command>query-errors</command> category.
                    </para>
                  </entry>
                </row>
index 6419dfeadf70acd252a108e3f2296c6215bdca25..d2193942fa6995a13ee1c6cd0ea772d7a91de280 100644 (file)
@@ -1219,7 +1219,8 @@ dns_rrl(dns_view_t *view,
         * Make a log message for the caller.
         */
        if (wouldlog)
-               make_log_buf(rrl, e, rrl->log_only ? "would " : NULL,
+               make_log_buf(rrl, e,
+                            rrl->log_only ? "would rate limit " : "rate limit ",
                             NULL, ISC_FALSE, qname, ISC_FALSE,
                             rrl_result, resp_result, log_buf, log_buf_len);