From: Peter van Dijk Date: Mon, 20 Nov 2017 13:32:23 +0000 (+0100) Subject: report remote IP when SOA query comes back with empty question section X-Git-Tag: auth-4.1.0~25^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5976%2Fhead;p=thirdparty%2Fpdns.git report remote IP when SOA query comes back with empty question section this improves the #5974 situation a bit --- diff --git a/pdns/resolver.cc b/pdns/resolver.cc index 86b224543c..51d81160c4 100644 --- a/pdns/resolver.cc +++ b/pdns/resolver.cc @@ -258,6 +258,9 @@ bool Resolver::tryGetSOASerial(DNSName *domain, uint32_t *theirSerial, uint32_t *id=mdp.d_header.id; *domain = mdp.d_qname; + if(domain->empty()) + throw ResolverException("SOA query to '" + fromaddr.toStringWithPort() + "' produced response without domain name (RCode: " + RCode::to_s(mdp.d_header.rcode) + ")"); + if(mdp.d_answers.empty()) throw ResolverException("Query to '" + fromaddr.toStringWithPort() + "' for SOA of '" + domain->toString() + "' produced no results (RCode: " + RCode::to_s(mdp.d_header.rcode) + ")");