mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
client can now reserve multiple types of quota simultaneously;
client quota bug fixes
This commit is contained in:
parent
ff03559f14
commit
09df1930e9
@ -1694,17 +1694,25 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain,
|
|||||||
unsigned int options = 0;
|
unsigned int options = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up a new client object to handle incoming queries while
|
* We are about to recurse, which means that this client will
|
||||||
* this one is being resolved.
|
* be unavailable for serving new requests for an indeterminate
|
||||||
|
* amount of time. If this client is currently responsible
|
||||||
|
* for handling incoming queries, set up a new client
|
||||||
|
* object to handle them while we are waiting for a
|
||||||
|
* response.
|
||||||
*/
|
*/
|
||||||
result = ns_client_replace(client, &ns_g_server->recursionquota);
|
if (! client->mortal) {
|
||||||
if (result != ISC_R_SUCCESS) {
|
result = isc_quota_attach(&ns_g_server->recursionquota,
|
||||||
/* Most likely the quota was full. */
|
&client->recursionquota);
|
||||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_CLIENT,
|
if (result == ISC_R_SUCCESS)
|
||||||
NS_LOGMODULE_QUERY, ISC_LOG_WARNING,
|
result = ns_client_replace(client);
|
||||||
"no more recursive clients: %s",
|
if (result != ISC_R_SUCCESS) {
|
||||||
isc_result_totext(result));
|
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_CLIENT,
|
||||||
return (result);
|
NS_LOGMODULE_QUERY, ISC_LOG_WARNING,
|
||||||
|
"no more recursive clients: %s",
|
||||||
|
isc_result_totext(result));
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user