From b5eb7822b0c971d3b4e244dc093acb30cededf95 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Thu, 20 Jun 2019 10:43:11 +0200 Subject: [PATCH] avoid exiting pdns_server on parse error during outgoing NOTIFY processing --- pdns/mastercommunicator.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pdns/mastercommunicator.cc b/pdns/mastercommunicator.cc index 5bd833604b..c90a87255e 100644 --- a/pdns/mastercommunicator.cc +++ b/pdns/mastercommunicator.cc @@ -54,6 +54,7 @@ void CommunicatorClass::queueNotifyDomain(const DNSName &domain, UeberBackend *B while(B->get(rr)) nsset.insert(rr.content); + try { for(set::const_iterator j=nsset.begin();j!=nsset.end();++j) { vector nsips=fns.lookup(DNSName(*j), B); if(nsips.empty()) @@ -68,7 +69,17 @@ void CommunicatorClass::queueNotifyDomain(const DNSName &domain, UeberBackend *B ips.insert(caIp.toStringWithPort()); } } + } + } + catch (PDNSException &ae) { + L << Logger::Error << "Error looking up name servers for " << domain << ", cannot notify: " << ae.reason << endl; + return; } + catch (std::exception &e) { + L << Logger::Error << "Error looking up name servers for " << domain << ", cannot notify: " << e.what() << endl; + return; + } + for(set::const_iterator j=ips.begin();j!=ips.end();++j) { L<