Jaco Engelbrecht wrote:
Hi,

On 16 Jun 2008, at 20:14, Augie Schwer wrote:

This sounds like #125
(http://wiki.powerdns.com/cgi-bin/trac.fcgi/ticket/125) which was
marked as resolved a while back; can you confirm that this old ticket
matches the behavior you are seeing?  --Augie

Ack!  Thanks! :)

I'll try svn co && pdebuild in the morning, and try it out.

Success!

Attached is a patch for anyone running Ubuntu Hardy, with PowerDNS 2.9.21-5ubuntu1.

Cheers,
Jaco
--- pdns/packethandler.cc       2007-04-21 13:56:36.000000000 +0000
+++ pdns/packethandler.cc       2008-06-17 12:12:28.027017831 +0000
@@ -392,8 +392,10 @@
        r->addRecord(rr);
       }
     }
-    if(hits && !found && !rfound && shortcut ) // we found matching qnames but not a qtype
+    if(hits && !found && !rfound && shortcut ) { // we found matching qnames but not a qtype 
+      DLOG(L<<"Found matching qname, but not the qtype"<<endl); 
       return 2;
+    }
 
     if(rfound)
       return 1; // ANY lookup found the right answer immediately
@@ -638,6 +640,7 @@
     mret=makeCanonic(p, r, target); // traverse CNAME chain until we have a useful record (may actually give the correct answer!)
 
     if(mret==2) { // there is some data, but not of the correct type
+      r->clearRecords();
       DLOG(L<<"There is some data, but not of the correct type, adding SOA for NXRECORDSET"<<endl);
       SOAData sd;
       if(getAuth(p, &sd, target, 0)) {
@@ -717,7 +720,7 @@
     
     // not found yet, try wildcards (we only try here in case of recursion - we should check before we hand off)
 
-    if(p->d.rd && d_doRecursion && d_doWildcards) { 
+    if(mret != 2 && p->d.rd && d_doRecursion && d_doWildcards) { 
       int res=doWildcardRecords(p,r,target);
       if(res) { // had a result
        // FIXME: wildCard may retarget us in the future
_______________________________________________
Pdns-users mailing list
[email protected]
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Reply via email to