From: Mark Andrews Date: Mon, 10 Apr 2006 22:17:05 +0000 (+0000) Subject: rate limit 'soft limit execeeded' messages X-Git-Tag: v9.3.2^2~17 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=7dee63af083f766417499df3014033e2db94eecd;p=thirdparty%2Fbind9.git rate limit 'soft limit execeeded' messages --- diff --git a/bin/named/query.c b/bin/named/query.c index 1faae69fa38..d01bb9c21d6 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: query.c,v 1.198.2.13.4.36.4.1 2006/03/31 00:29:47 marka Exp $ */ +/* $Id: query.c,v 1.198.2.13.4.36.4.2 2006/04/10 22:17:05 marka Exp $ */ #include @@ -2091,10 +2091,16 @@ 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) { + 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) {