summaryrefslogtreecommitdiff
path: root/iterator/iterator.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2019-06-30 15:01:11 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2019-06-30 15:01:11 +0000
commit366b94c4a9552acfb560d3234aea0955ebc1eb8e (patch)
tree0bee3a4dbb699714374eeab0af43e63f1bf9672d /iterator/iterator.c
parent4713c21a1ac91081e50e474d11fcec002b43a562 (diff)
Notes
Diffstat (limited to 'iterator/iterator.c')
-rw-r--r--iterator/iterator.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/iterator/iterator.c b/iterator/iterator.c
index c73fb5177489..c906c2714483 100644
--- a/iterator/iterator.c
+++ b/iterator/iterator.c
@@ -2718,8 +2718,15 @@ processQueryResponse(struct module_qstate* qstate, struct iter_qstate* iq,
&& !(iq->chase_flags & BIT_RD)) {
if(FLAGS_GET_RCODE(iq->response->rep->flags) !=
LDNS_RCODE_NOERROR) {
- if(qstate->env->cfg->qname_minimisation_strict)
- return final_state(iq);
+ if(qstate->env->cfg->qname_minimisation_strict) {
+ if(FLAGS_GET_RCODE(iq->response->rep->flags) ==
+ LDNS_RCODE_NXDOMAIN) {
+ iter_scrub_nxdomain(iq->response);
+ return final_state(iq);
+ }
+ return error_response(qstate, id,
+ LDNS_RCODE_SERVFAIL);
+ }
/* Best effort qname-minimisation.
* Stop minimising and send full query when
* RCODE is not NOERROR. */