Skip to content

Commit

Permalink
Merge pull request #4905 from rgacogne/revert-4638
Browse files Browse the repository at this point in the history
Revert "auth: In `Bind2Backend::lookup()`, use the `zoneId` when we have it"
  • Loading branch information
pieterlexis committed Jan 16, 2017
2 parents eea741a + 98b9845 commit c5414ea
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions modules/bindbackend/bindbackend2.cc
Expand Up @@ -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)
Expand Down

0 comments on commit c5414ea

Please sign in to comment.