bind9/lib
Diego Fronza 1cee557993 Fix transfer of glue records in stub zones if master has minimal-responses set
Stub zones don't make use of AXFR/IXFR for the transfering of zone
data, instead, a single query is issued to the master asking for
their nameserver records (NS).

That works fine unless master is configured with 'minimal-responses'
set to yes, in which case glue records are not provided by master
in the answer with nameservers authoritative for the zone, leaving
stub zones with incomplete databases.

This commit fix this problem in a simple way, when the answer with
the authoritative nameservers is received from master (stub_callback),
for each nameserver listed (save_nsrrset), a A and AAAA records for
the name is verified in the additional section, and if not present
a query is created to resolve the corresponsing missing glue.

A struct 'stub_cb_args' was added to keep relevant information for
performing a query, like TSIG key, udp size, dscp value, etc, this
information is borrowed from, and created within function 'ns_query',
where the resolving of nameserver from master starts.

A new field was added to the struct 'dns_stub', an atomic integer,
namely pending_requests, which is used to keep how many queries are
created when resolving nameserver addresses that were missing in
the glue.

When the value of pending_requests is zero we know we can release
resources, adjust zone timers, dump to zone file, etc.
2020-10-21 12:03:42 -03:00
..
bind9 Fix function overrides in unit tests on macOS 2020-09-28 09:09:21 +02:00
dns Fix transfer of glue records in stub zones if master has minimal-responses set 2020-10-21 12:03:42 -03:00
irs Fix function overrides in unit tests on macOS 2020-09-28 09:09:21 +02:00
isc Don't increment network error stats on UV_EOF 2020-10-20 10:57:16 +02:00
isccc Fix function overrides in unit tests on macOS 2020-09-28 09:09:21 +02:00
isccfg Fix function overrides in unit tests on macOS 2020-09-28 09:09:21 +02:00
ns Simplify the EDNS buffer size logic for DNS Flag Day 2020 2020-10-05 16:21:21 +02:00
samples The dns_message_create() cannot fail, change the return to void 2020-09-29 08:22:08 +02:00
win32/bindevt update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
.gitignore Provide unit test driver 2020-05-21 12:13:01 +02:00
Makefile.am Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
unit-test-driver.sh.in Provide unit test driver 2020-05-21 12:13:01 +02:00