]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
Revert "iterate: fix minimisation downgrade when encountering authoritative referrals"
authorMarek Vavruša <mvavrusa@cloudflare.com>
Wed, 30 May 2018 04:37:50 +0000 (21:37 -0700)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 7 Sep 2018 17:45:21 +0000 (10:45 -0700)
This reverts commit e51864e98f951a1d22808410d42751b0d1bb6772.

lib/layer/iterate.c
lib/utils.c

index 2724f4f6789545ba2eca76cde6a31ce0b313b789..37040528d235ad65de6d42bf96fad105313e77e3 100644 (file)
@@ -457,9 +457,6 @@ static int process_authority(knot_pkt_t *pkt, struct kr_request *req)
                                /* NS below cut in authority indicates different authority,
                                 * but same NS set. */
                                qry->zone_cut.name = knot_dname_copy(rr->owner, &req->pool);
-                               /* Process as referral unless the NS is actually the target of the current query. */
-                               if (!knot_dname_is_equal(rr->owner, qry->sname))
-                                       result = KR_STATE_DONE;
                        }
                }
        }
@@ -1093,7 +1090,6 @@ static int resolve(kr_layer_t *ctx, knot_pkt_t *pkt)
        }
 
        /* Resolve authority to see if it's referral or authoritative. */
-       bool is_referral_and_auth = knot_wire_get_aa(pkt->wire);
        int state = process_authority(pkt, req);
        switch(state) {
        case KR_STATE_CONSUME: /* Not referral, process answer. */
@@ -1102,11 +1098,6 @@ static int resolve(kr_layer_t *ctx, knot_pkt_t *pkt)
                break;
        case KR_STATE_DONE: /* Referral */
                state = process_referral_answer(pkt,req);
-               /* Continue with the server when switching from parent to child zone
-                * side of the delegation on the same nameserver. */
-               if (state == KR_STATE_DONE && is_referral_and_auth) {
-                       state = KR_STATE_CONSUME;
-               }
                VERBOSE_MSG("<= referral response, follow\n");
                break;
        default:
index fbd28faeec53c11c451182f974e3f4bcd42aee2c..6c0adcafa9ce48c03bcd4214b33a23ea2415e480 100644 (file)
@@ -713,6 +713,7 @@ int kr_ranked_rrarray_add(ranked_rr_array_t *array, const knot_rrset_t *rr,
                /* Found the entry to merge with.  Check consistency and merge. */
                bool ok = stashed->rank == rank && !stashed->cached;
                if (!ok) {
+                       assert(false);
                        return kr_error(EEXIST);
                }
                /* It may happen that an RRset is first considered useful