dns_server: Do the exact match query first, then do the wildcard lookup
commit7d60443c5d02f4a06e45e592ad136c16ca7e2ddb
authorAndrew Bartlett <abartlet@samba.org>
Thu, 14 Dec 2017 23:30:50 +0000 (15 12:30 +1300)
committerStefan Metzmacher <metze@samba.org>
Fri, 22 Dec 2017 09:05:07 +0000 (22 10:05 +0100)
treeae92f6b7414841976e6e44a26cd8c97e0fc35cee
parent2cd8389320af9d1f346193f448f8870a8cee2188
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>
(cherry picked from commit 3efc879d98ba136d4d70e0e2d77fac9614186ab3)
source4/dns_server/dnsserver_common.c