]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
getNSEC3PARAM callsite: Define to false by default out-param narrow. 11957/head
authorAxel Viala <axel.viala@darnuria.eu>
Wed, 14 Sep 2022 13:23:05 +0000 (15:23 +0200)
committerAxel Viala <axel.viala@darnuria.eu>
Wed, 14 Sep 2022 14:49:38 +0000 (16:49 +0200)
modules/bindbackend/bindbackend2.cc
pdns/packethandler.cc
pdns/pdnsutil.cc
pdns/tcpreceiver.cc

index 748636a7d5fff29b650fbd239bceec76140631ab..902c9fa82c82d8dddf70b5e7d3d11f7bb7de2bea 100644 (file)
@@ -491,7 +491,7 @@ void Bind2Backend::alsoNotifies(const DNSName& domain, set<string>* ips)
 void Bind2Backend::parseZoneFile(BB2DomainInfo* bbd)
 {
   NSEC3PARAMRecordContent ns3pr;
-  bool nsec3zone;
+  bool nsec3zone = false;
   if (d_hybrid) {
     DNSSECKeeper dk;
     nsec3zone = dk.getNSEC3PARAM(bbd->d_name, &ns3pr);
index 6ae3d081deda3bc0805f21c2fc7428a27692a372..c63ec0b80ddddcb33e1c7efc01426e558e79e796 100644 (file)
@@ -789,7 +789,7 @@ void PacketHandler::emitNSEC3(std::unique_ptr<DNSPacket>& r, const NSEC3PARAMRec
 void PacketHandler::addNSECX(DNSPacket& p, std::unique_ptr<DNSPacket>& r, const DNSName& target, const DNSName& wildcard, int mode)
 {
   NSEC3PARAMRecordContent ns3rc;
-  bool narrow;
+  bool narrow = false;
   if(d_dk.getNSEC3PARAM(d_sd.qname, &ns3rc, &narrow))  {
     if (mode != 5) // no direct NSEC3 queries, rfc5155 7.2.8
       addNSEC3(p, r, target, wildcard, ns3rc, narrow, mode);
index 5f80ab26c42edc91ece7abc8d5813d7bf04cecce..e709e1c93278bc20dcec847203bb48492a83ebcc 100644 (file)
@@ -934,7 +934,7 @@ static int increaseSerial(const DNSName& zone, DNSSECKeeper &dk)
 
   if (sd.db->doesDNSSEC()) {
     NSEC3PARAMRecordContent ns3pr;
-    bool narrow;
+    bool narrow = false;
     bool haveNSEC3=dk.getNSEC3PARAM(zone, &ns3pr, &narrow);
 
     DNSName ordername;
@@ -2027,7 +2027,7 @@ static bool showZone(DNSSECKeeper& dk, const DNSName& zone, bool exportDS = fals
   }
 
   NSEC3PARAMRecordContent ns3pr;
-  bool narrow;
+  bool narrow = false;
   bool haveNSEC3=dk.getNSEC3PARAM(zone, &ns3pr, &narrow);
 
   DNSSECKeeper::keyset_t keyset=dk.getKeys(zone);
@@ -3383,7 +3383,7 @@ try
     DNSName zone(cmds.at(1));
     DNSName record(cmds.at(2));
     NSEC3PARAMRecordContent ns3pr;
-    bool narrow;
+    bool narrow = false;
     if(!dk.getNSEC3PARAM(zone, &ns3pr, &narrow)) {
       cerr<<"The '"<<zone<<"' zone does not use NSEC3"<<endl;
       return 0;
index 47a1c29ba159efd67f3886bcc92041079ea3cbf7..d49ad04595cc03f1d92cbce537832f613aa74694 100644 (file)
@@ -1211,7 +1211,7 @@ int TCPNameserver::doIXFR(std::unique_ptr<DNSPacket>& q, int outsock)
 
     DNSSECKeeper dk((*packetHandler)->getBackend());
     DNSSECKeeper::clearCaches(q->qdomain);
-    bool narrow;
+    bool narrow = false;
     securedZone = dk.isSecuredZone(q->qdomain);
     if(dk.getNSEC3PARAM(q->qdomain, nullptr, &narrow)) {
       if(narrow) {