]> 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:15:46 +0000 (03:15 +0000)
committerMark Andrews <marka@isc.org>
Thu, 18 May 2006 03:15:46 +0000 (03:15 +0000)
                        [RT #16044]

CHANGES
bin/named/query.c

diff --git a/CHANGES b/CHANGES
index 936c19a014e96772b62c8aca4a3e306fdcd04d7e..ac638564e8ef8ddd64a3f928cad031e450d5d427 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2026.  [bug]           Rate limit the two recursive client exceeded messages.
+                       [RT #16044]
+
 2024.  [bug]           named emited spurious "zone serial unchanged"
                        messages on reload. [RT #16027]
 
index c41921e32363ffc54c35e0667ca991e0a7d1077e..4fe866cf0b73ed9b5c6930271d76bfe3c6e08e1b 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.198.2.13.4.40 2006/05/16 03:29:41 marka Exp $ */
+/* $Id: query.c,v 1.198.2.13.4.41 2006/05/18 03:15:46 marka Exp $ */
 
 #include <config.h>
 
@@ -2091,17 +2091,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 &&