mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
Exempt prefetches from the fetches-per-server quota
Give prefetches a free pass through the quota so that the cache
entries for popular zones could be updated successfully even if the
quota for is already reached.
(cherry picked from commit c7e8b7cf63
)
This commit is contained in:
committed by
Arаm Sаrgsyаn
parent
d96fca478a
commit
c90aa16929
@@ -1481,7 +1481,9 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find, dns_adbname_t *name) {
|
|||||||
dns_adbaddrinfo_t *addrinfo = NULL;
|
dns_adbaddrinfo_t *addrinfo = NULL;
|
||||||
entry = namehook->entry;
|
entry = namehook->entry;
|
||||||
|
|
||||||
if (adbentry_overquota(entry)) {
|
if ((find->options & DNS_ADBFIND_QUOTAEXEMPT) == 0 &&
|
||||||
|
adbentry_overquota(entry))
|
||||||
|
{
|
||||||
find->options |= DNS_ADBFIND_OVERQUOTA;
|
find->options |= DNS_ADBFIND_OVERQUOTA;
|
||||||
goto nextv4;
|
goto nextv4;
|
||||||
}
|
}
|
||||||
@@ -1503,7 +1505,9 @@ copy_namehook_lists(dns_adb_t *adb, dns_adbfind_t *find, dns_adbname_t *name) {
|
|||||||
dns_adbaddrinfo_t *addrinfo = NULL;
|
dns_adbaddrinfo_t *addrinfo = NULL;
|
||||||
entry = namehook->entry;
|
entry = namehook->entry;
|
||||||
|
|
||||||
if (adbentry_overquota(entry)) {
|
if ((find->options & DNS_ADBFIND_QUOTAEXEMPT) == 0 &&
|
||||||
|
adbentry_overquota(entry))
|
||||||
|
{
|
||||||
find->options |= DNS_ADBFIND_OVERQUOTA;
|
find->options |= DNS_ADBFIND_OVERQUOTA;
|
||||||
goto nextv6;
|
goto nextv6;
|
||||||
}
|
}
|
||||||
|
@@ -179,6 +179,10 @@ struct dns_adbfind {
|
|||||||
* This is useful for reestablishing glue that has expired.
|
* This is useful for reestablishing glue that has expired.
|
||||||
*/
|
*/
|
||||||
#define DNS_ADBFIND_STARTATZONE 0x00000020
|
#define DNS_ADBFIND_STARTATZONE 0x00000020
|
||||||
|
/*%
|
||||||
|
* Fetches will be exempted from the quota.
|
||||||
|
*/
|
||||||
|
#define DNS_ADBFIND_QUOTAEXEMPT 0x00000040
|
||||||
/*%
|
/*%
|
||||||
* The server's fetch quota is exceeded; it will be treated as
|
* The server's fetch quota is exceeded; it will be treated as
|
||||||
* lame for this query.
|
* lame for this query.
|
||||||
|
@@ -3263,6 +3263,13 @@ findname(fetchctx_t *fctx, const dns_name_t *name, in_port_t port,
|
|||||||
options |= DNS_ADBFIND_STARTATZONE;
|
options |= DNS_ADBFIND_STARTATZONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Exempt prefetches from ADB quota.
|
||||||
|
*/
|
||||||
|
if ((fctx->options & DNS_FETCHOPT_PREFETCH) != 0) {
|
||||||
|
options |= DNS_ADBFIND_QUOTAEXEMPT;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See what we know about this address.
|
* See what we know about this address.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user