bind9/lib/dns
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
..
include Simplify the EDNS buffer size logic for DNS Flag Day 2020 2020-10-05 16:21:21 +02:00
rdata update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
tests Add the ability select individual tests to rdata_test 2020-10-01 08:21:42 +00:00
win32 Simplify the EDNS buffer size logic for DNS Flag Day 2020 2020-10-05 16:21:21 +02:00
.gitignore 4394. [func] Add rndc command "dnstap-reopen" to close and 2016-06-24 09:37:04 +10:00
acl.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
adb.c Simplify the EDNS buffer size logic for DNS Flag Day 2020 2020-10-05 16:21:21 +02:00
api Update library API versions 2020-09-16 22:34:06 +02:00
badcache.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
byaddr.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
cache.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
callbacks.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
catz.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
client.c The dns_message_create() cannot fail, change the return to void 2020-09-29 08:22:08 +02:00
clientinfo.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
compress.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
db.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dbiterator.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dbtable.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
diff.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dispatch.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dlz.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dns64.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dnsrps.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dnssec.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dnstap.c The dns_message_create() cannot fail, change the return to void 2020-09-29 08:22:08 +02:00
dnstap.proto fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
ds.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_api.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_internal.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_openssl.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_parse.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_parse.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_pkcs11.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_result.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dyndb.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ecs.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
fixedname.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
forward.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
gen-unix.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
gen-win32.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
gen.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
geoip2.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
gssapi_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
gssapictx.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
hmac_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ipkeylist.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
iptable.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
journal.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
kasp.c Fix kasp min key size bug 2020-10-02 09:20:40 +02:00
key.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
keydata.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
keymgr.c Use explicit result codes for 'rndc dnssec' cmd 2020-10-05 10:53:46 +02:00
keytable.c Add missing rwlock calls when access keynode.initial and keynode.managed 2020-10-01 17:26:09 +10:00
lib.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
log.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
lookup.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
Makefile.am Fix function overrides in unit tests on macOS 2020-09-28 09:09:21 +02:00
master.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
masterdump.c rndc dumpdb -expired: print when RRsets expired 2020-09-23 16:09:26 +02:00
message.c Check that sig0 name is the root. 2020-09-30 13:24:29 +00:00
name.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ncache.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
nsec.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
nsec3.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
nta.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
openssl_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
openssldh_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
opensslecdsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
openssleddsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
opensslrsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
order.c Allow "order none" in "rrset-order" rules 2020-10-02 08:41:43 +02:00
peer.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
pkcs11.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
pkcs11ecdsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
pkcs11eddsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
pkcs11rsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
portlist.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
private.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rbt.c Remove the memmove call on dns_rbtnode_t structure that contains atomics 2020-09-21 08:58:20 +00:00
rbtdb.c Change condition for rndc dumpdb -expired 2020-10-05 10:44:50 +02:00
rbtdb.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rcode.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdata.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdatalist.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdatalist_p.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdataset.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdatasetiter.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdataslab.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
request.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
resolver.c Restore the dns_message_reset() call before the dns_dispatch_getnext() 2020-10-08 10:55:35 +11:00
result.c Use explicit result codes for 'rndc dnssec' cmd 2020-10-05 10:53:46 +02:00
rootns.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rpz.c Fix updating summary RPZ DB for mixed-case RPZs 2020-09-21 09:28:36 +02:00
rriterator.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rrl.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
sdb.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
sdlz.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
soa.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ssu.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ssu_external.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
stats.c Update comments to have binary notation 2020-09-29 10:36:07 +10:00
tcpmsg.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
time.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
timer.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
tkey.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
tsec.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
tsig.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
tsig_p.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ttl.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
update.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
validator.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
view.c Address lock order inversions. 2020-09-23 01:13:28 +00:00
xfrin.c The dns_message_create() cannot fail, change the return to void 2020-09-29 08:22:08 +02:00
zone.c Fix transfer of glue records in stub zones if master has minimal-responses set 2020-10-21 12:03:42 -03:00
zone_p.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
zonekey.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
zoneverify.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
zt.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00