]> granicus.if.org Git - pdns/commitdiff
fix uninitalized var in suck()
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 19 May 2014 13:41:56 +0000 (15:41 +0200)
committermind04 <mind04@monshouwer.org>
Tue, 20 May 2014 08:15:06 +0000 (10:15 +0200)
pdns/slavecommunicator.cc

index 91d3b88accfe1fb1912bed46f26d2582ea6cfe4a..c0cbdb3d65f929dd71b0a167de6bc3445bb23102 100644 (file)
@@ -319,8 +319,9 @@ void CommunicatorClass::suck(const string &domain,const string &remote)
       if(doent && !rrterm.empty()) {
         bool auth;
         if (!rr.auth && rr.qtype.getCode() == QType::NS) {
-          ordername=toBase32Hex(hashQNameWithSalt(ns3pr.d_iterations, ns3pr.d_salt, rr.qname));
-          auth=(!optOutFlag || secured.count(ordername));
+          if (isNSEC3)
+            ordername=toBase32Hex(hashQNameWithSalt(ns3pr.d_iterations, ns3pr.d_salt, rr.qname));
+          auth=(!isNSEC3 || !optOutFlag || secured.count(ordername));
         } else
           auth=rr.auth;