]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2026. [bug] Rate limit the two recursive client exceeded messages.
authorMark Andrews <marka@isc.org>
Thu, 18 May 2006 03:14:03 +0000 (03:14 +0000)
committerMark Andrews <marka@isc.org>
Thu, 18 May 2006 03:14:03 +0000 (03:14 +0000)
                        [RT #16044]

CHANGES
bin/named/query.c

diff --git a/CHANGES b/CHANGES
index db7e253db7855063352fa68f2935b26806f1795a..c6864ac02814f938149e16a4843479b7e74806c1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2026.  [bug]           Rate limit the two recursive client exceeded messages.
+                       [RT #16044]
+
 2025.  [func]          Update "zone serial unchanged" message. [RT #16026]
 
 2024.  [bug]           named emited spurious "zone serial unchanged"
index 4ff81368cce6522477d8b1f269c8b26ca4c2d776..2a65957a0f85d21fa85f6047c53949c3c848dd21 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.257.18.29 2006/05/16 03:28:16 marka Exp $ */
+/* $Id: query.c,v 1.257.18.30 2006/05/18 03:14:03 marka Exp $ */
 
 /*! \file */
 
@@ -2958,17 +2958,31 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain,
                result = isc_quota_attach(&ns_g_server->recursionquota,
                                          &client->recursionquota);
                if  (result == ISC_R_SOFTQUOTA) {
-                       ns_client_log(client, NS_LOGCATEGORY_CLIENT,
-                                     NS_LOGMODULE_QUERY, ISC_LOG_WARNING,
-                                     "recursive-clients soft limit exceeded, "
-                                     "aborting oldest query");
+                       static isc_stdtime_t last = 0;
+                       isc_stdtime_t now;
+                       isc_stdtime_get(&now);
+                       if (now != last) {
+                               last = now;
+                               ns_client_log(client, NS_LOGCATEGORY_CLIENT,
+                                             NS_LOGMODULE_QUERY,
+                                             ISC_LOG_WARNING,
+                                             "recursive-clients soft limit "
+                                             "exceeded, aborting oldest query");
+                       }
                        ns_client_killoldestquery(client);
                        result = ISC_R_SUCCESS;
                } else if (result == ISC_R_QUOTA) {
-                       ns_client_log(client, NS_LOGCATEGORY_CLIENT,
-                                     NS_LOGMODULE_QUERY, ISC_LOG_WARNING,
-                                     "no more recursive clients: %s",
-                                     isc_result_totext(result));
+                       static isc_stdtime_t last = 0;
+                       isc_stdtime_t now;
+                       isc_stdtime_get(&now);
+                       if (now != last) {
+                               last = now;
+                               ns_client_log(client, NS_LOGCATEGORY_CLIENT,
+                                             NS_LOGMODULE_QUERY,
+                                             ISC_LOG_WARNING,
+                                             "no more recursive clients: %s",
+                                             isc_result_totext(result));
+                       }
                        ns_client_killoldestquery(client);
                }
                if (result == ISC_R_SUCCESS && !client->mortal &&