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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a36815f4d373e6248ab532a55dc9ee050986b632;p=pdns 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 86b224543..51d81160c 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) + ")");