From 37907be50e31b29f26c4d5935e3dc96d7697a02b Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Thu, 20 Jun 2019 13:03:11 +0200 Subject: [PATCH] Revert "Fix fatal exception on unparseable slave addresses." This reverts commit 2c75693e72abe792e0bf9b55c5f8f443fa220160. --- pdns/communicator.hh | 24 +++++------------------- pdns/mastercommunicator.cc | 2 +- pdns/tcpreceiver.cc | 2 +- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/pdns/communicator.hh b/pdns/communicator.hh index f646b2226..a7f95b81d 100644 --- a/pdns/communicator.hh +++ b/pdns/communicator.hh @@ -244,32 +244,18 @@ private: class FindNS { public: - vector lookup(const DNSName &name, UeberBackend *b, const DNSName& zone) + vector lookup(const DNSName &name, UeberBackend *b) { vector addresses; this->resolve_name(&addresses, name); if(b) { - b->lookup(QType(QType::ANY),name); - while (true) { - try { - DNSZoneRecord rr; - if (!b->get(rr)) - break; - if (rr.dr.d_type == QType::A || rr.dr.d_type == QType::AAAA) + b->lookup(QType(QType::ANY),name); + DNSZoneRecord rr; + while(b->get(rr)) + if(rr.dr.d_type == QType::A || rr.dr.d_type==QType::AAAA) addresses.push_back(rr.dr.d_content->getZoneRepresentation()); // SOL if you have a CNAME for an NS - } - // After an exception, b can be inconsistent so break - catch (PDNSException &ae) { - L << Logger::Error << "Could not lookup address for nameserver " << name << " in zone " << zone << ", cannot notify: " << ae.reason << endl; - break; - } - catch (std::exception &e) { - L << Logger::Error << "Could not lookup address for nameserver " << name << " in zone " << zone << ", cannot notify: " << e.what() << endl; - break; - } - } } return addresses; } diff --git a/pdns/mastercommunicator.cc b/pdns/mastercommunicator.cc index 8be9ebad9..456957a80 100644 --- a/pdns/mastercommunicator.cc +++ b/pdns/mastercommunicator.cc @@ -56,7 +56,7 @@ void CommunicatorClass::queueNotifyDomain(const DomainInfo& di, UeberBackend* B) nsset.insert(getRR(rr.dr)->getNS().toString()); for(set::const_iterator j=nsset.begin();j!=nsset.end();++j) { - vector nsips=fns.lookup(DNSName(*j), B, di.zone); + vector nsips=fns.lookup(DNSName(*j), B); if(nsips.empty()) L< q) while(B->get(rr)) nsset.insert(DNSName(rr.content)); for(const auto & j: nsset) { - vector nsips=fns.lookup(j, s_P->getBackend(),q->qdomain); + vector nsips=fns.lookup(j, s_P->getBackend()); for(vector::const_iterator k=nsips.begin();k!=nsips.end();++k) { // cerr<<"got "<<*k<<" from AUTO-NS"<getRemote().toString()) -- 2.40.0