]> 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:14:22 +0000 (22:14 -0700)
(cherry picked from commit 622bef6aeca9b31d341483bbba812af378515c6e)

lib/dns/resolver.c

index 37e1e3e5d3ee0be5410c8cc3eb2708e161189a30..52ac674ec28f6805427b52d19c76f9977af97b15 100644 (file)
@@ -9240,6 +9240,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;