From: Remi Gacogne Date: Fri, 13 Jan 2017 16:40:02 +0000 (+0100) Subject: Revert "auth: In `Bind2Backend::lookup()`, use the `zoneId` when we have it" X-Git-Tag: rec-4.1.0-alpha1~326^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4905%2Fhead;p=thirdparty%2Fpdns.git Revert "auth: In `Bind2Backend::lookup()`, use the `zoneId` when we have it" This reverts commit 937a66255ff05f2e754ef113833e54cc4cf2004b. It doesn't work with multiple backends since the `zoneId` is passed to every available backend on `lookup()`. --- diff --git a/modules/bindbackend/bindbackend2.cc b/modules/bindbackend/bindbackend2.cc index 837fd509f6..c7cec262bf 100644 --- a/modules/bindbackend/bindbackend2.cc +++ b/modules/bindbackend/bindbackend2.cc @@ -1015,17 +1015,9 @@ void Bind2Backend::lookup(const QType &qtype, const DNSName &qname, DNSPacket *p bool found=false; BB2DomainInfo bbd; - if (zoneId != -1) { - found = safeGetBBDomainInfo(zoneId, &bbd); - if (found) { - domain = bbd.d_name; - } - } - else { - do { - found = safeGetBBDomainInfo(domain, &bbd); - } while (!found && domain.chopOff()); - } + do { + found = safeGetBBDomainInfo(domain, &bbd); + } while ((!found || (zoneId != (int)bbd.d_id && zoneId != -1)) && domain.chopOff()); if(!found) { if(mustlog)