dns: merge dlz/internal dns_records_match()
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Mon, 12 Apr 2021 19:00:41 +0000 (07:00 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 11 Jun 2021 08:38:34 +0000 (08:38 +0000)
commit070e7113d4c9f267db856eb4db6d6c2505047a64
tree50d70362e3563c9de151541b92bc7c5872300735
parentf6025d9f3409174ae1889caa4b94b4df2dcfa874
dns: merge dlz/internal dns_records_match()

We have had three nearly identical functions called
dns_record[s]_match. This patch merges two of them, attempting to keep
the good bits and not the bugs.

That means:

1. We use the AAAA match from dlz, which is agnostic to all the
billions of ways you can write the same IPv6 address (case sensitivity
is just the beginning).

2. We lean more on the TXT match from dns_utils, because the dlz used
a weird bitwise &= operator, but we adjust to exit early.

3. Keep HINFO from dlz (for now).

4. Use the dns_name_equal() that was already in dns_common, which was
used by dlz. dns_utils had a strange one that probably did the same
thing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dns_server/dlz_bind9.c
source4/dns_server/dns_server.h
source4/dns_server/dns_utils.c
source4/dns_server/dnsserver_common.c
source4/dns_server/dnsserver_common.h