]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
reset fctx->qmindcname and fctx->qminname after processing a delegation
authorMark Andrews <marka@isc.org>
Thu, 12 Sep 2019 06:03:41 +0000 (16:03 +1000)
committerEvan Hunt <each@isc.org>
Wed, 2 Oct 2019 05:09:04 +0000 (22:09 -0700)
lib/dns/resolver.c

index 03f74e9033272234d4b8cb24e1af66ee4fba6849..9d11349da3bb0ddc04f1f8b5330b128b1b055908 100644 (file)
@@ -9184,6 +9184,23 @@ rctx_referral(respctx_t *rctx) {
                return (ISC_R_COMPLETE);
        }
 
+       if ((fctx->options & DNS_FETCHOPT_QMINIMIZE) != 0) {
+               dns_name_free(&fctx->qmindcname, fctx->mctx);
+               dns_name_init(&fctx->qmindcname, NULL);
+               result = dns_name_dup(rctx->ns_name, fctx->mctx,
+                                     &fctx->qmindcname);
+               if (result != ISC_R_SUCCESS) {
+                       rctx->result = result;
+                       return (ISC_R_COMPLETE);
+               }
+
+               result= fctx_minimize_qname(fctx);
+               if (result != ISC_R_SUCCESS) {
+                       rctx->result = result;
+                       return (ISC_R_COMPLETE);
+               }
+       }
+
        result = fcount_incr(fctx, true);
        if (result != ISC_R_SUCCESS) {
                rctx->result = result;