caffe8
Index: /trunk/pdns/pdns/packethandler.cc
caffe8
===================================================================
caffe8
--- /trunk/pdns/pdns/packethandler.cc (revision 1079)
caffe8
+++ /trunk/pdns/pdns/packethandler.cc (revision 1081)
caffe8
@@ -399,6 +399,8 @@
caffe8
       }
caffe8
     }
caffe8
-    if(hits && !found && !rfound && shortcut ) // we found matching qnames but not a qtype
caffe8
+    if(hits && !found && !rfound && shortcut ) { // we found matching qnames but not a qtype
caffe8
+      DLOG(L<<"Found matching qname, but not the qtype"<
caffe8
       return 2;
caffe8
+    }
caffe8
 
caffe8
     if(rfound)
caffe8
@@ -654,4 +656,5 @@
caffe8
 
caffe8
     if(mret==2) { // there is some data, but not of the correct type
caffe8
+      r->clearRecords();
caffe8
       DLOG(L<<"There is some data, but not of the correct type, adding SOA for NXRECORDSET"<
caffe8
       SOAData sd;
caffe8
@@ -696,5 +699,4 @@
caffe8
       }
caffe8
     }
caffe8
-
caffe8
     noSameLevelNS=true;
caffe8
 
caffe8
@@ -739,5 +741,5 @@
caffe8
     // not found yet, try wildcards (we only try here in case of recursion - we should check before we hand off)
caffe8
 
caffe8
-    if(p->d.rd && d_doRecursion && d_doWildcards) { 
caffe8
+    if(mret != 2 && p->d.rd && d_doRecursion && d_doWildcards) { 
caffe8
       int res=doWildcardRecords(p,r,target);
caffe8
       if(res) { // had a result