mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-03 22:08:25 -04:00
Raise max-clients-per-query to be at least
In the case where 'clients-per-query' is larger than
'max-clients-per-query', raise 'max-clients-per-query' so that
'clients-per-query' equals 'max-clients-per-query' and log a warning
that this is what happened.
(cherry picked from commit f6f9645ed1)
This commit is contained in:
parent
41cc6eeaaf
commit
c5b8e1f5a1
1 changed files with 16 additions and 5 deletions
|
|
@ -4191,7 +4191,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
uint32_t maxbits;
|
||||
unsigned int resopts = 0;
|
||||
dns_zone_t *zone = NULL;
|
||||
uint32_t max_clients_per_query;
|
||||
uint32_t clients_per_query, max_clients_per_query;
|
||||
bool empty_zones_enable;
|
||||
const cfg_obj_t *disablelist = NULL;
|
||||
isc_stats_t *resstats = NULL;
|
||||
|
|
@ -5621,15 +5621,26 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
INSIST(result == ISC_R_SUCCESS);
|
||||
view->v6bias = cfg_obj_asuint32(obj) * 1000;
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "clients-per-query", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
clients_per_query = cfg_obj_asuint32(obj);
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "max-clients-per-query", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
max_clients_per_query = cfg_obj_asuint32(obj);
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "clients-per-query", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_resolver_setclientsperquery(view->resolver, cfg_obj_asuint32(obj),
|
||||
if (max_clients_per_query < clients_per_query) {
|
||||
cfg_obj_log(obj, named_g_lctx, ISC_LOG_WARNING,
|
||||
"configured clients-per-query (%u) exceeds "
|
||||
"max-clients-per-query (%u); automatically "
|
||||
"adjusting max-clients-per-query to (%u)",
|
||||
clients_per_query, max_clients_per_query,
|
||||
clients_per_query);
|
||||
max_clients_per_query = clients_per_query;
|
||||
}
|
||||
dns_resolver_setclientsperquery(view->resolver, clients_per_query,
|
||||
max_clients_per_query);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue