mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Recurse to find the root server list with 'dig +trace'.
This commit is contained in:
parent
00ff786384
commit
e65d4989a1
4 changed files with 13 additions and 6 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
5237. [bug] Recurse to find the root server list with 'dig +trace'.
|
||||
[GL #1028]
|
||||
|
||||
5236. [func] Add SipHash 2-4 implementation in lib/isc/siphash.c
|
||||
and switch isc_hash_function() to use SipHash 2-4.
|
||||
[GL #605]
|
||||
|
|
|
|||
|
|
@ -1462,7 +1462,7 @@ plus_option(char *option, bool is_batchfile,
|
|||
lookup->trace = state;
|
||||
lookup->trace_root = state;
|
||||
if (state) {
|
||||
lookup->recurse = false;
|
||||
lookup->recurse = true;
|
||||
lookup->identify = true;
|
||||
lookup->comments = false;
|
||||
lookup->rrcomments = 0;
|
||||
|
|
|
|||
|
|
@ -1010,8 +1010,10 @@
|
|||
in the query. This bit is set by default, which means
|
||||
<command>dig</command> normally sends recursive
|
||||
queries. Recursion is automatically disabled when
|
||||
the <parameter>+nssearch</parameter> or
|
||||
<parameter>+trace</parameter> query options are used.
|
||||
using the <parameter>+nssearch</parameter> option, and
|
||||
when using <parameter>+trace</parameter> except for
|
||||
an initial recursive query to get the list of root
|
||||
servers.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
|||
|
|
@ -2191,12 +2191,14 @@ setup_lookup(dig_lookup_t *lookup) {
|
|||
lookup->sendmsg->id = (dns_messageid_t)isc_random16();
|
||||
lookup->sendmsg->opcode = lookup->opcode;
|
||||
lookup->msgcounter = 0;
|
||||
|
||||
/*
|
||||
* If this is a trace request, completely disallow recursion, since
|
||||
* it's meaningless for traces.
|
||||
* If this is a trace request, completely disallow recursion after
|
||||
* looking up the root name servers, since it's meaningless for traces.
|
||||
*/
|
||||
if (lookup->trace || (lookup->ns_search_only && !lookup->trace_root))
|
||||
if ((lookup->trace || lookup->ns_search_only) && !lookup->trace_root) {
|
||||
lookup->recurse = false;
|
||||
}
|
||||
|
||||
if (lookup->recurse &&
|
||||
lookup->rdtype != dns_rdatatype_axfr &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue