]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
iterate.c: remove workaround in process_authority remove-process_authority-workaround
authorŠtěpán Balážik <stepan.balazik@nic.cz>
Thu, 4 Feb 2021 16:04:16 +0000 (17:04 +0100)
committerŠtěpán Balážik <stepan.balazik@nic.cz>
Thu, 4 Feb 2021 16:04:16 +0000 (17:04 +0100)
AA means AA, we terminate the resolution.

lib/layer/iterate.c

index 94342cfb510eccdf09d31ef3b76c09c33ea34512..7812b24edd83582112f86c47f4d1d550cbb0f5a2 100644 (file)
@@ -398,27 +398,11 @@ static int process_authority(knot_pkt_t *pkt, struct kr_request *req)
        const knot_pktsection_t *ns = knot_pkt_section(pkt, KNOT_AUTHORITY);
        const knot_pktsection_t *an = knot_pkt_section(pkt, KNOT_ANSWER);
 
-#ifdef STRICT_MODE
        /* AA, terminate resolution chain. */
        if (knot_wire_get_aa(pkt->wire)) {
                return KR_STATE_CONSUME;
        }
-#else
-       /* Work around servers sending back CNAME with different delegation and no AA. */
-       if (an->count > 0 && ns->count > 0) {
-               const knot_rrset_t *rr = knot_pkt_rr(an, 0);
-               if (rr->type == KNOT_RRTYPE_CNAME) {
-                       return KR_STATE_CONSUME;
-               }
-               /* 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;
-               }
-       }
-#endif
+
        /* Remember current bailiwick for NS processing. */
        const knot_dname_t *current_zone_cut = qry->zone_cut.name;
        bool ns_record_exists = false;