summaryrefslogtreecommitdiff
path: root/usr.sbin/unbound/services/cache/dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/unbound/services/cache/dns.c')
-rw-r--r--usr.sbin/unbound/services/cache/dns.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/unbound/services/cache/dns.c b/usr.sbin/unbound/services/cache/dns.c
index 6bca8d85fad..b6e5697349c 100644
--- a/usr.sbin/unbound/services/cache/dns.c
+++ b/usr.sbin/unbound/services/cache/dns.c
@@ -404,6 +404,9 @@ cache_fill_missing(struct module_env* env, uint16_t qclass,
struct ub_packed_rrset_key* akey;
time_t now = *env->now;
for(ns = dp->nslist; ns; ns = ns->next) {
+ if(ns->cache_lookup_count > ITERATOR_NAME_CACHELOOKUP_MAX)
+ continue;
+ ns->cache_lookup_count++;
akey = rrset_cache_lookup(env->rrset_cache, ns->name,
ns->namelen, LDNS_RR_TYPE_A, qclass, 0, now, 0);
if(akey) {