diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2018-05-12 11:53:39 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2018-05-12 11:53:39 +0000 |
| commit | 6cacf549d3c2d5bddb0dcadd620e1db2897c7f26 (patch) | |
| tree | e187e7d708a063f1628697fe779e2bb101d451b8 /validator/validator.c | |
| parent | fbdb9ac866a647da0919b224f05cca039afc02fa (diff) | |
Notes
Diffstat (limited to 'validator/validator.c')
| -rw-r--r-- | validator/validator.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/validator/validator.c b/validator/validator.c index 676dcdfe4d8b..81ba5fa17ba2 100644 --- a/validator/validator.c +++ b/validator/validator.c @@ -2089,18 +2089,20 @@ processFinished(struct module_qstate* qstate, struct val_qstate* vq, } /* store results in cache */ - if(!qstate->no_cache_store && qstate->query_flags&BIT_RD) { + if(qstate->query_flags&BIT_RD) { /* if secure, this will override cache anyway, no need * to check if from parentNS */ - if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo, - vq->orig_msg->rep, 0, qstate->prefetch_leeway, 0, NULL, - qstate->query_flags)) { - log_err("out of memory caching validator results"); + if(!qstate->no_cache_store) { + if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo, + vq->orig_msg->rep, 0, qstate->prefetch_leeway, 0, NULL, + qstate->query_flags)) { + log_err("out of memory caching validator results"); + } } } else { /* for a referral, store the verified RRsets */ /* and this does not get prefetched, so no leeway */ - if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo, + if(!dns_cache_store(qstate->env, &vq->orig_msg->qinfo, vq->orig_msg->rep, 1, 0, 0, NULL, qstate->query_flags)) { log_err("out of memory caching validator results"); |
