goto sendit;
int mret;
+
retargeted:;
if(retargetcount++>10) {
L<<Logger::Error<<"Detected wildcard CNAME loop involving '"<<target<<"'"<<endl;
mret=makeCanonic(p, r, target); // traverse CNAME chain until we have a useful record (may actually give the correct answer!)
DLOG(L<<Logger::Warning<<"MakeCanonic returned "<<mret<<endl);
- if(mret==2) { // there is some data, but not of the correct type
+ if(mret==2 && retargetcount==1) { // there is some data, but not of the correct type
r->clearRecords();
}
if(d_doFancyRecords) { // MBOXFW, URL <- fake records, emulated with MX and A
--- /dev/null
+If a CNAME wildcard is present, and it matches, but points to a record that
+does not have the requested type, a CNAME should be emitted plus a SOA to
+indicate no match with the right record
--- /dev/null
+0 yo.test.test.com. IN CNAME 3600 server1.test.com.
+1 test.com. IN SOA 3600 ns1.test.com. ahu.example.com. 2005092501 28800 7200 604800 86400
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='yo.test.test.com.', qtype=AAAA