From: bert hubert Date: Wed, 31 Jan 2018 15:16:57 +0000 (+0100) Subject: lua records would respond with 32 bits only matching answers. Now only does as many... X-Git-Tag: dnsdist-1.3.1~136^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7312c080bd9bfbae62bde0f56008a29997996ea3;p=thirdparty%2Fpdns.git lua records would respond with 32 bits only matching answers. Now only does as many bits as you supplied. --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 6074b4b7ac..c374e2833f 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -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)