From ddfc9f632ae38ad970f13d0470fd8d42d85cd2dd Mon Sep 17 00:00:00 2001 From: bert hubert Date: Wed, 6 Jan 2016 20:50:11 +0100 Subject: [PATCH] some more error checking in ixplore instead of blinding charging on, plus fix IPv6 outgoing --- pdns/ixplore.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pdns/ixplore.cc b/pdns/ixplore.cc index 08eecf3fa..3a21d6b02 100644 --- a/pdns/ixplore.cc +++ b/pdns/ixplore.cc @@ -70,6 +70,9 @@ uint32_t getSerialFromMaster(const ComboAddress& master, const DNSName& zone, sh string reply; s.read(reply); MOADNSParser mdp(reply); + if(mdp.d_header.rcode) { + throw std::runtime_error("Unable to retrieve SOA serial from master '"+master.toStringWithPort()+"': "+RCode::to_s(mdp.d_header.rcode)); + } for(const auto& r: mdp.d_answers) { if(r.first.d_type == QType::SOA) { sr = std::dynamic_pointer_cast(r.first.d_content); @@ -229,8 +232,8 @@ try catch(std::exception& e) { cout<<"Could not load zone from disk: "< chunk; -- 2.40.0