mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-02 13:30:44 -05:00
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. |
||
|---|---|---|
| .. | ||
| bind9 | ||
| dns | ||
| irs | ||
| isc | ||
| isccc | ||
| isccfg | ||
| ns | ||
| samples | ||
| win32/bindevt | ||
| .gitignore | ||
| Makefile.am | ||
| unit-test-driver.sh.in | ||