dirmngr: Fix recursive resolver mode.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 14 Jun 2018 04:01:45 +0000 (13:01 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 14 Jun 2018 04:01:45 +0000 (13:01 +0900)
* dirmngr/dns-stuff.c (libdns_init): Initialize options.recurse.

--

To reproduce an error, run:

    ./t-dns-stuff --debug --recursive-resolver www.gnupg.org

Then, it returns "No name" error.  That's because there was only setup
for root servers, and no setup for recursive query in fact.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
dirmngr/dns-stuff.c

index 7324aae..ffac816 100644 (file)
@@ -612,6 +612,8 @@ libdns_init (void)
       }
   }
 
+  ld.resolv_conf->options.recurse = recursive_resolver_p ();
+
   /* dns_hints_local for stub mode, dns_hints_root for recursive.  */
   ld.hints = (recursive_resolver
               ? dns_hints_root  (ld.resolv_conf, &derr)