]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Tweaks and typos
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 25 Jan 2022 07:55:01 +0000 (08:55 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 25 Jan 2022 07:55:01 +0000 (08:55 +0100)
pdns/recursordist/rec-zonetocache.cc
pdns/zonemd.cc

index 7347b613212689c8070923d22dcbfc3b6585ffc0..3918766ac5128173f4e3089d4aeb0411b2ff383a 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 #include "rec-zonetocache.hh"
-#include <algorithm>
 
 #include "syncres.hh"
 #include "zoneparser-tng.hh"
@@ -316,15 +315,14 @@ vState ZoneData::dnssecValidate(pdns::ZoneMD& zonemd, size_t& zonemdCount) const
       d_log->info("zone NSEC(3) record does not validate");
       return nsecValidationStatus;
     }
+
     auto denial = getDenial(csp, d_zone, QType::ZONEMD, false, false, true);
-    switch (denial) {
-    case dState::NXQTYPE:
+    if (denial == dState::NXQTYPE) {
       d_log->info("Validated denial of absence of ZONEMD record");
       return vState::Secure;
-    default:
-      d_log->info("No ZONEMD record, but NSEC(3) record does not deny it");
-      return vState::BogusInvalidDenial;
     }
+    d_log->info("No ZONEMD record, but NSEC(3) record does not deny it");
+    return vState::BogusInvalidDenial;
   }
 
   // Collect the ZONEMD records and validate them using the validated DNSSKEYs
@@ -345,7 +343,7 @@ void ZoneData::ZoneToCache(const RecZoneToCache::Config& config)
     throw PDNSException("ZONEMD DNSSEC validation failure: DNSSEC validation is switched off but required by ZoneToCache");
   }
 
-  // First scan all records collecting info about delegations ans sigs
+  // First scan all records collecting info about delegations and sigs
   // A this moment, we ignore NSEC and NSEC3 records. It is not clear to me yet under which conditions
   // they could be entered in into the (neg)cache.
 
index 1ee0b58b9cde55b601b8544aef46f4afc5c4e51a..c357e911ef3c650419ebde41f9f25f88317772e8 100644 (file)
@@ -223,7 +223,7 @@ void pdns::ZoneMD::verify(bool& validationDone, bool& validationOK)
     }
 
     if (sorted.empty()) {
-      // continue;
+      continue;
     }
 
     if (qtype != QType::RRSIG) {