rate limit 'soft limit execeeded' messages

This commit is contained in:
Mark Andrews
2006-04-10 22:17:05 +00:00
parent 969c0fe902
commit 7dee63af08
+11 -5
View File
@@ -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 <config.h>
@@ -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) {