mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-16 17:18:51 -05:00
make better use of the cache.
git-svn-id: file:///svn/unbound/trunk@1763 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
948567bea8
commit
1cd84ce84e
1 changed files with 14 additions and 1 deletions
|
|
@ -1697,11 +1697,24 @@ val_dlv_init(struct module_qstate* qstate, struct val_qstate* vq,
|
|||
|
||||
/* If we can find the name in the aggressive negative cache,
|
||||
* give up; insecure is the answer */
|
||||
if(val_neg_dlvlookup(ve->neg_cache, vq->dlv_lookup_name,
|
||||
while(val_neg_dlvlookup(ve->neg_cache, vq->dlv_lookup_name,
|
||||
vq->dlv_lookup_name_len, vq->qchase.qclass,
|
||||
qstate->env->rrset_cache, *qstate->env->now)) {
|
||||
/* go up */
|
||||
dname_remove_label(&vq->dlv_lookup_name,
|
||||
&vq->dlv_lookup_name_len);
|
||||
/* too high? */
|
||||
if(!dname_subdomain_c(vq->dlv_lookup_name,
|
||||
qstate->env->anchors->dlv_anchor->name)) {
|
||||
verbose(VERB_ALGO, "ask above dlv repo");
|
||||
return 1; /* Above the repo is insecure */
|
||||
}
|
||||
/* above chain of trust? */
|
||||
if(vq->dlv_insecure_at && !dname_subdomain_c(
|
||||
vq->dlv_lookup_name, vq->dlv_insecure_at)) {
|
||||
verbose(VERB_ALGO, "ask above insecure endpoint");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* perform a lookup for the DLV; with validation */
|
||||
|
|
|
|||
Loading…
Reference in a new issue