]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
layer/iterate: name comparison has been missed; comment
authorGrigorii Demidov <grigorii.demidov@nic.cz>
Tue, 4 Apr 2017 09:02:44 +0000 (11:02 +0200)
committerGrigorii Demidov <grigorii.demidov@nic.cz>
Tue, 4 Apr 2017 09:02:44 +0000 (11:02 +0200)
lib/layer/iterate.c

index 5a6047250ecf153f31e007d7e2295137d9d19017..cc78631d78dc1f9ecd63505e1377f0ecdf319caa 100644 (file)
@@ -330,7 +330,11 @@ static int process_authority(knot_pkt_t *pkt, struct kr_request *req)
                if (rr->type == KNOT_RRTYPE_CNAME) {
                        return KR_STATE_CONSUME;
                }
-               if (knot_wire_get_aa(pkt->wire) && (rr->type == qry->stype)) {
+               /* Work around for these NSs which are authoritative both for
+                * parent and child and mixes data from both zones in single answer */
+               if (knot_wire_get_aa(pkt->wire) &&
+                   (rr->type == qry->stype) &&
+                   (knot_dname_is_equal(rr->owner, qry->sname))) {
                        return KR_STATE_CONSUME;
                }
        }