X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/adns/blobdiff_plain/2c7b101bee6ae4f7cee1417ff769603eaa161ddf..a5da68220c8d2ef7ff4b599f24e7e2d415b651f6:/src/reply.c?ds=inline 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; }