]> granicus.if.org Git - pdns/commitdiff
fix uninitialised values in bind backend
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 19 May 2014 12:56:50 +0000 (14:56 +0200)
committermind04 <mind04@monshouwer.org>
Mon, 19 May 2014 13:08:30 +0000 (15:08 +0200)
modules/bindbackend/bindbackend2.cc

index 1bb72320df019e85db194524fd3539f34722d181..f174d7ed961d9a9f26dddd66949f84cf1402c3e1 100644 (file)
@@ -482,6 +482,8 @@ void Bind2Backend::insertRecord(BB2DomainInfo& bb2, const string &qnameu, const
   
   if (auth) // Set auth on empty non-terminals
     bdr.auth=*auth;
+  else
+    bdr.auth=true;
 
   if(bdr.qtype == QType::MX || bdr.qtype == QType::SRV) { 
     prio=atoi(bdr.content.c_str());
@@ -670,7 +672,7 @@ void Bind2Backend::doEmptyNonTerminals(BB2DomainInfo& bbd, bool nsec3zone, NSEC3
     shorter=labelReverse(bdr.qname);
 
     if (!bdr.auth && bdr.qtype == QType::NS)
-      auth=(!ns3pr.d_flags);
+      auth=(!nsec3zone || !ns3pr.d_flags);
     else
       auth=bdr.auth;