]> granicus.if.org Git - pdns/commitdiff
lua records would respond with 32 bits only matching answers. Now only does as many...
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 31 Jan 2018 15:16:57 +0000 (16:16 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 31 Jan 2018 15:16:57 +0000 (16:16 +0100)
pdns/packethandler.cc

index 6074b4b7ac3ea511199aaaad871f2dafe5927aa5..c374e2833ff657cd4a5049b149b40ae3f33bff35 100644 (file)
@@ -388,7 +388,7 @@ bool PacketHandler::getBestWildcard(DNSPacket *p, SOAData& sd, const DNSName &ta
           for(const auto& r : recvec) {
             rr.dr.d_type = rec->d_type; // might be CNAME
             rr.dr.d_content = r;
-            rr.scopeMask = 32; // XXX or 128 - needs to disable cache in any case
+            rr.scopeMask = p->getRealRemote().getBits(); // this makes sure answer is a specific as your question
             ret->push_back(rr);
           }
         }
@@ -1342,7 +1342,8 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p)
             for(const auto& r : recvec) {
               rr.dr.d_type = rec->d_type; // might be CNAME
               rr.dr.d_content = r;
-              rr.scopeMask = 32;
+              rr.scopeMask = p->getRealRemote().getBits(); // this makes sure answer is a specific as your question
+
               rrset.push_back(rr);
             }
             if(rec->d_type == QType::CNAME && p->qtype.getCode() != QType::CNAME)