dns_server: Do the exact match query first, then do the wildcard lookup
authorAndrew Bartlett <abartlet@samba.org>
Thu, 14 Dec 2017 23:30:50 +0000 (12:30 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 Dec 2017 06:19:21 +0000 (07:19 +0100)
commit3efc879d98ba136d4d70e0e2d77fac9614186ab3
treefd995fd7d9054f2f27607d4dc8532144b025e38a
parent948791aca70ca973755adcef27dc02da4c46f267
dns_server: Do the exact match query first, then do the wildcard lookup

The wildcard lookup is SCOPE_ONELEVEL combined with an index on the name
attribute.  This is not as efficient as a base DN lookup, so we try for
that first.

A not-found and wildcard response will still fall back to the ONELEVEL
index.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13191

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/dns_server/dnsserver_common.c