]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: With catalog zone transfers, check if SOA is defined before using
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 4 May 2026 10:11:43 +0000 (12:11 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 8 Jun 2026 09:54:31 +0000 (11:54 +0200)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/rec-xfr.cc

index d50daeacea18d32eae7b9d24ca728b0945df9601..96066d5c56c20a353a9719613c0f9d3a86ff0fcc 100644 (file)
@@ -225,6 +225,10 @@ static shared_ptr<const SOARecordContent> loadZoneFromServer(Logr::log_t plogger
     zone->clear();
     throw PDNSException("duplicate PTR values in catalog zone");
   }
+  if (!soaRecordContent) {
+    zone->clear();
+    throw PDNSException("No valid SOA found in catalog zone AXFR");
+  }
   logger->info(Logr::Info, "Zone load completed", "nrecords", Logging::Loggable(nrecords), "soa", Logging::Loggable(soaRecordContent->getZoneRepresentation()));
   return soaRecordContent;
 }