]> granicus.if.org Git - pdns/commitdiff
With this commit, the recursor authoritative server can deal with CNAME wildcards...
authorbert hubert <bert.hubert@powerdns.com>
Tue, 21 Feb 2017 12:19:08 +0000 (13:19 +0100)
committerbert hubert <bert.hubert@powerdns.com>
Fri, 24 Feb 2017 13:37:57 +0000 (14:37 +0100)
pdns/syncres.cc

index bdd157d7a6065c5b55492f9f2238eebcfee9394f..52824465811dcf9a76da85dfa1dbdd4df4097865 100644 (file)
@@ -245,7 +245,8 @@ bool SyncRes::doOOBResolve(const DNSName &qname, const QType &qtype, vector<DNSR
 
     for(ziter=range.first; ziter!=range.second; ++ziter) {
       DNSRecord dr=*ziter;
-      if(dr.d_type == qtype.getCode() || qtype.getCode() == QType::ANY) {
+      // if we hit a CNAME, just answer that - rest of recursor will do the needful & follow
+      if(dr.d_type == qtype.getCode() || qtype.getCode() == QType::ANY || dr.d_type == QType::CNAME) {
         dr.d_name = qname;
         dr.d_place=DNSResourceRecord::ANSWER;
         ret.push_back(dr);