From: Aki Tuomi Date: Sat, 7 Nov 2015 18:16:05 +0000 (+0200) Subject: Assume empty is root. X-Git-Tag: dnsdist-1.0.0-alpha1~239^2~4^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e9974be94da75515f27a66c1bbd4e3d5ce951c2;p=pdns Assume empty is root. --- diff --git a/pdns/backends/gsql/gsqlbackend.cc b/pdns/backends/gsql/gsqlbackend.cc index e5d712546..422275a60 100644 --- a/pdns/backends/gsql/gsqlbackend.cc +++ b/pdns/backends/gsql/gsqlbackend.cc @@ -1588,6 +1588,8 @@ void GSQLBackend::extractRecord(const SSqlStatement::row_t& row, DNSResourceReco r.qname=d_qname; else r.qname=DNSName(row[6]); + if (r.qname.empty()) r.qname = DNSName("."); + r.qtype=row[3]; if (r.qtype==QType::MX || r.qtype==QType::SRV)