From: Marek VavruĊĦa Date: Tue, 28 Aug 2018 17:32:45 +0000 (-0700) Subject: allow the delegation change if NS has both zones and child is in bailiwick X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ba103f9bb539367066a6235ef6547a994404f68;p=thirdparty%2Fknot-resolver.git allow the delegation change if NS has both zones and child is in bailiwick Previous change required the new delegation to contain QNAME, but that's not always the case with chasing CNAME chains. This relaxes the requirement to QNAME from the response packet, so it always follows the next chased name. --- diff --git a/lib/layer/iterate.c b/lib/layer/iterate.c index 06c4012f8..3ae1b64b5 100644 --- a/lib/layer/iterate.c +++ b/lib/layer/iterate.c @@ -454,7 +454,7 @@ static int process_authority(knot_pkt_t *pkt, struct kr_request *req) const knot_rrset_t *rr = knot_pkt_rr(an, i); if (rr->type == KNOT_RRTYPE_NS && knot_dname_in_bailiwick(rr->owner, qry->zone_cut.name) > 0 - && knot_dname_in_bailiwick(rr->owner, qry->sname) >= 0) { + && knot_dname_in_bailiwick(rr->owner, knot_pkt_qname(pkt)) >= 0) { /* NS below cut in authority indicates different authority, * but same NS set. */ qry->zone_cut.name = knot_dname_copy(rr->owner, &req->pool);