From: Grégory Oestreicher Date: Sat, 24 Jun 2017 22:09:50 +0000 (+0200) Subject: Fix lookups in strict mode and filter on the record type X-Git-Tag: dnsdist-1.3.1~167^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0235595a989f137dd6a6937d23992791aedf59b3;p=pdns Fix lookups in strict mode and filter on the record type --- diff --git a/modules/ldapbackend/native.cc b/modules/ldapbackend/native.cc index fd1489091..980cfbce9 100644 --- a/modules/ldapbackend/native.cc +++ b/modules/ldapbackend/native.cc @@ -210,13 +210,14 @@ void LdapBackend::lookup_strict( const QType &qtype, const DNSName &qname, DNSPa else // IPv4 and IPv6 lookups { filter = "associatedDomain=" + qesc; - if( qtype.getCode() != QType::ANY ) - { - attr = qtype.getName() + "Record"; - filter = "&(" + filter + ")(" + attr + "=*)"; - attronly[0] = attr.c_str(); - attributes = attronly; - } + } + + if( qtype.getCode() != QType::ANY ) + { + attr = qtype.getName() + "Record"; + filter = "&(" + filter + ")(" + attr + "=*)"; + attronly[0] = attr.c_str(); + attributes = attronly; } filter = strbind( ":target:", filter, getArg( "filter-lookup" ) );