Commit 0fc9c25c authored by Mark Andrews's avatar Mark Andrews
Browse files

Merge branch...

Merge branch '1028-dig-trace-should-not-set-rd-0-norecurse-for-the-initial-root-hints-query-v9_14' into 'v9_14'

Resolve "dig +trace should not set RD=0 (+norecurse) for the initial root hints query"

See merge request !1955
parents 4b21ee60 98de15b7
Pipeline #14889 passed with stages
in 2 minutes and 4 seconds
5237. [bug] Recurse to find the root server list with 'dig +trace'.
[GL #1028]
5234. [port] arm: just use the compiler's default support for
yield. [GL #981]
 
......
......@@ -1445,7 +1445,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;
......
......@@ -1000,8 +1000,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 &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment