From 1ecce4462e2199cd313b0a299a81dfac839f4fba Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 24 Jul 2017 09:34:09 +0300 Subject: [PATCH] geoipbackend: Allow mixing static and service lookup. This allows using service records at apex level. Closes #3747 --- modules/geoipbackend/geoipbackend.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/geoipbackend/geoipbackend.cc b/modules/geoipbackend/geoipbackend.cc index b10a54b63..929f5345b 100644 --- a/modules/geoipbackend/geoipbackend.cc +++ b/modules/geoipbackend/geoipbackend.cc @@ -368,8 +368,7 @@ void GeoIPBackend::lookup(const QType &qtype, const DNSName& qdomain, DNSPacket gl.netmask = 0; - if (this->lookup_static(dom, search, qtype, qdomain, ip, gl, v6)) - return; + (void)this->lookup_static(dom, search, qtype, qdomain, ip, gl, v6); auto target = dom.services.find(search); if (target == dom.services.end()) return; // no hit @@ -389,6 +388,15 @@ void GeoIPBackend::lookup(const QType &qtype, const DNSName& qdomain, DNSPacket return; } + if (!d_result.empty()) { + L<