bind9/bin
Witold Kręcicki aa9866c390 If possible don't use forwarders when priming the resolver.
If we try to fetch a record from cache and need to look into
hints database we assume that the resolver is not primed and
start dns_resolver_prime(). Priming query is supposed to return
NSes for "." in ANSWER section and glue records for them in
ADDITIONAL section, so that we can fill that info in 'regular'
cache and not use hints db anymore.
However, if we're using a forwarder the priming query goes through
it, and if it's configured to return minimal answers we won't get
the addresses of root servers in ADDITIONAL section. Since the
only records for root servers we have are in hints database we'll
try to prime the resolver with every single query.

This patch adds a DNS_FETCHOPT_NOFORWARD flag which avoids using
forwarders if possible (that is if we have forward-first policy).
Using this flag on priming fetch fixes the problem as we get the
proper glue. With forward-only policy the problem is non-existent,
as we'll never ask for root server addresses because we'll never
have a need to query them.

Also added a test to confirm priming queries are not forwarded.

(cherry picked from commit b49310ac06)
(cherry picked from commit f8963ad70e)
2019-01-16 22:27:52 -08:00
..
check Normalize windows files and shell scripts 2019-01-16 19:04:50 -05:00
confgen Normalize windows files and shell scripts 2019-01-16 19:04:50 -05:00
delv update copyrights 2019-01-02 10:26:49 +11:00
dig Normalize windows files and shell scripts 2019-01-16 19:04:50 -05:00
dnssec Normalize windows files and shell scripts 2019-01-16 19:04:50 -05:00
named Fix a few cosmetic issues with rndc managed-keys 2019-01-14 18:19:22 -08:00
nsupdate update copyrights 2019-01-02 10:26:49 +11:00
pkcs11 Normalize windows files and shell scripts 2019-01-16 19:04:50 -05:00
python update copyrights 2019-01-02 10:26:49 +11:00
rndc Normalize windows files and shell scripts 2019-01-16 19:04:50 -05:00
tests If possible don't use forwarders when priming the resolver. 2019-01-16 22:27:52 -08:00
tools update copyrights 2019-01-02 10:26:49 +11:00
win32/BINDInstall Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
Makefile.in update file headers to remove copyright years 2018-03-14 16:40:20 -07:00