From: Marek VavruĊĦa Date: Wed, 30 May 2018 04:37:50 +0000 (-0700) Subject: Revert "iterate: fix minimisation downgrade when encountering authoritative referrals" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94221e8bedce356d10cf5101fe1d2836d2761cae;p=thirdparty%2Fknot-resolver.git Revert "iterate: fix minimisation downgrade when encountering authoritative referrals" This reverts commit e51864e98f951a1d22808410d42751b0d1bb6772. --- diff --git a/lib/layer/iterate.c b/lib/layer/iterate.c index 2724f4f67..37040528d 100644 --- a/lib/layer/iterate.c +++ b/lib/layer/iterate.c @@ -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: diff --git a/lib/utils.c b/lib/utils.c index fbd28faee..6c0adcafa 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -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