From a36815f4d373e6248ab532a55dc9ee050986b632 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Mon, 20 Nov 2017 14:32:23 +0100 Subject: [PATCH] report remote IP when SOA query comes back with empty question section this improves the #5974 situation a bit --- pdns/resolver.cc | 3 +++ 1 file changed, 3 insertions(+) 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) + ")"); -- 2.40.0