max-ncache-ttl 10800; /* 3 hours */\n\
max-recursion-depth 7;\n\
max-recursion-queries 32;\n\
+ max-query-count 200;\n\
max-query-restarts 11;\n\
max-stale-ttl 86400; /* 1 day */\n\
message-compression yes;\n\
INSIST(result == ISC_R_SUCCESS);
dns_view_setmaxrestarts(view, cfg_obj_asuint32(obj));
+ obj = NULL;
+ result = named_config_get(maps, "max-query-count", &obj);
+ INSIST(result == ISC_R_SUCCESS);
+ dns_view_setmaxqueries(view, cfg_obj_asuint32(obj));
+
obj = NULL;
result = named_config_get(maps, "max-validations-per-fetch", &obj);
if (result == ISC_R_SUCCESS) {
check-names primary warn;
check-names secondary ignore;
max-cache-size 20000000000000;
+ max-query-count 100;
max-query-restarts 10;
nta-lifetime 604800;
nta-recheck 604800;
format is more human-readable, and is thus suitable when a zone is to
be edited by hand. The default is ``relative``.
+.. namedconf:statement:: max-query-count
+ :tags: server, query
+ :short: Sets the maximum number of iterative queries while servicing a recursive query.
+
+ This sets the maximum number of iterative queries that may be sent
+ by a resolver while looking up a single name. If more queries than this
+ need to be sent before an answer is reached, then recursion is terminated
+ and a SERVFAIL response is returned to the client. The default is ``200``.
+
.. namedconf:statement:: max-recursion-depth
:tags: server
:short: Sets the maximum number of levels of recursion permitted at any one time while servicing a recursive query.
max-ixfr-ratio ( unlimited | <percentage> );
max-journal-size ( default | unlimited | <sizeval> );
max-ncache-ttl <duration>;
+ max-query-count <integer>;
max-query-restarts <integer>;
max-records <integer>;
max-records-per-type <integer>;
max-ixfr-ratio ( unlimited | <percentage> );
max-journal-size ( default | unlimited | <sizeval> );
max-ncache-ttl <duration>;
+ max-query-count <integer>;
max-query-restarts <integer>;
max-records <integer>;
max-records-per-type <integer>;
unsigned int udpsize;
uint32_t maxrrperset;
uint32_t maxtypepername;
+ uint16_t max_queries;
uint8_t max_restarts;
/*
*\li 'max_restarts' is greater than 0.
*/
+void
+dns_view_setmaxqueries(dns_view_t *view, uint16_t max_queries);
+/*%
+ * Set the number of permissible outgoing queries before we give up.
+ * This defaults to 200.
+ *
+ * Requires:
+ *
+ *\li 'view' is valid;
+ *\li 'max_queries' is greater than 0.
+ */
+
+
ISC_LANG_ENDDECLS
unsigned int query_timeout;
unsigned int maxdepth;
unsigned int maxqueries;
+ unsigned int maxquerycount;
isc_result_t quotaresp[2];
isc_stats_t *stats;
dns_stats_t *querystats;
view->max_restarts = max_restarts;
}
+
+void
+dns_view_setmaxqueries(dns_view_t *view, uint16_t max_queries) {
+ REQUIRE(DNS_VIEW_VALID(view));
+ REQUIRE(max_queries > 0);
+
+ view->max_queries = max_queries;
+}
{ "max-ncache-ttl", &cfg_type_duration, 0 },
{ "max-recursion-depth", &cfg_type_uint32, 0 },
{ "max-recursion-queries", &cfg_type_uint32, 0 },
+ { "max-query-count", &cfg_type_uint32, 0 },
{ "max-query-restarts", &cfg_type_uint32, 0 },
{ "max-stale-ttl", &cfg_type_duration, 0 },
{ "max-udp-size", &cfg_type_uint32, 0 },