From 410f8bd398245ed12c5620f6eed62262729ac257 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Thu, 20 Jun 2019 13:04:30 +0200 Subject: [PATCH] catch name & IP parse errors during outgoing notify preparations (cherry picked from commit a53928cb568844a07fc83e1d090fdd1e21ee524d) (L renamed to g_log) --- pdns/mastercommunicator.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pdns/mastercommunicator.cc b/pdns/mastercommunicator.cc index b5841132c..bdd13fb38 100644 --- a/pdns/mastercommunicator.cc +++ b/pdns/mastercommunicator.cc @@ -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) { + g_log << Logger::Error << "Error looking up name servers for " << di.zone << ", cannot notify: " << ae.reason << endl; + return; + } + catch (std::exception &e) { + g_log << Logger::Error << "Error looking up name servers for " << di.zone << ", cannot notify: " << e.what() << endl; + return; + } + set alsoNotify(d_alsoNotify); B->alsoNotifies(di.zone, &alsoNotify); -- 2.40.0