]> granicus.if.org Git - pdns/commitdiff
catch name & IP parse errors during outgoing notify preparations
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 20 Jun 2019 11:04:30 +0000 (13:04 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 20 Jun 2019 11:04:30 +0000 (13:04 +0200)
pdns/mastercommunicator.cc

index 456957a80d789aff457de76fe71bccccef6b1f9d..ce0355c76f649ee802f39aa6a3d4427994a43da7 100644 (file)
@@ -50,6 +50,7 @@ void CommunicatorClass::queueNotifyDomain(const DomainInfo& di, UeberBackend* B)
   FindNS fns;
 
 
+  try {
   if (d_onlyNotify.size()) {
     B->lookup(QType(QType::NS), di.zone);
     while(B->get(rr))
@@ -77,6 +78,16 @@ void CommunicatorClass::queueNotifyDomain(const DomainInfo& di, UeberBackend* B)
       hasQueuedItem=true;
     }
   }
+  }
+  catch (PDNSException &ae) {
+    L << Logger::Error << "Error looking up name servers for " << di.zone << ", cannot notify: " << ae.reason << endl;
+    return;
+  }
+  catch (std::exception &e) {
+    L << Logger::Error << "Error looking up name servers for " << di.zone << ", cannot notify: " << e.what() << endl;
+    return;
+  }
+
 
   set<string> alsoNotify(d_alsoNotify);
   B->alsoNotifies(di.zone, &alsoNotify);