From: bert hubert Date: Wed, 6 Jan 2016 19:50:11 +0000 (+0100) Subject: some more error checking in ixplore instead of blinding charging on, plus fix IPv6... X-Git-Tag: dnsdist-1.0.0-alpha2~113^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddfc9f632ae38ad970f13d0470fd8d42d85cd2dd;p=thirdparty%2Fpdns.git some more error checking in ixplore instead of blinding charging on, plus fix IPv6 outgoing --- diff --git a/pdns/ixplore.cc b/pdns/ixplore.cc index 08eecf3fa7..3a21d6b02a 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;