X-Git-Url: https://git.distorted.org.uk/~mdw/adns/blobdiff_plain/2c7b101bee6ae4f7cee1417ff769603eaa161ddf..7def4935e643180b1f085781da85db7c3a9f6dad:/src/reply.c diff --git a/src/reply.c b/src/reply.c index 452c5f6..ab7c8ff 100644 --- a/src/reply.c +++ b/src/reply.c @@ -156,7 +156,7 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen, } continue; } - if (rrtype == adns_r_cname && /* fixme - implement adns_qf_nocname */ + if (rrtype == adns_r_cname && (qu->typei->type & adns__rrt_typemask) != adns_r_cname) { if (qu->flags & adns_qf_cname_forbid) { adns__query_fail(qu,adns_s_prohibitedcname); @@ -227,7 +227,12 @@ void adns__procdgram(adns_state ads, const byte *dgram, int dglen, if (rcode == rcode_nxdomain) { /* We still wanted to look for the SOA so we could find the TTL. */ adns__update_expires(qu,soattl,now); - adns__query_fail(qu,adns_s_nxdomain); + + if (qu->flags & adns_qf_search) { + adns__search_next(ads,qu,now); + } else { + adns__query_fail(qu,adns_s_nxdomain); + } return; }