manually with ./configure libtool=mylibtool or set $libtool in
the environment.
- update of the ldns tarball to current ldns svn version (fix 181).
+ - bug 184: -r option for unbound-host, read resolv.conf for
+ forwarder. (Note that forwarder must support DNSSEC for validation
+ to succeed).
23 May 2008: Wouter
- mingw32 porting.
.SH "SYNOPSIS"
.LP
.B unbound\-host
-.RB [ \-vdh ]
+.RB [ \-vdhr ]
.RB [ \-c
.IR class ]
.RB [ \-t
.B \-C \fIconfigfile
Uses the specified unbound.conf to prime
.IR libunbound (3).
+.TP
+.B \-r
+Read /etc/resolv.conf, and use the forward DNS servers from there (those could
+have been set by DHCP). More info in
+.IR resolv.conf (5).
+Breaks validation if those servers do not support DNSSEC.
.SH "EXAMPLES"
.LP
Some examples of use. The keys shown below are fakes, thus a security failure
static void
usage()
{
- printf("Usage: unbound-host [-vdh] [-c class] [-t type] hostname\n");
+ printf("Usage: unbound-host [-vdhr] [-c class] [-t type] hostname\n");
printf(" [-y key] [-f keyfile] [-F namedkeyfile]\n");
printf(" [-C configfile]\n");
printf(" Queries the DNS for information.\n");
printf(" -f keyfile read trust anchors from file, with lines as -y.\n");
printf(" -F keyfile read named.conf-style trust anchors.\n");
printf(" -C config use the specified unbound.conf\n");
+ printf(" -r read forwarder information from /etc/resolv.conf\n");
+ printf(" breaks validation if the fwder does not do DNSSEC.\n");
printf(" -v be more verbose, shows nodata and security.\n");
printf(" -d debug, traces the action, -d -d shows more.\n");
printf(" -h show this usage help.\n");
}
/* parse the options */
- while( (c=getopt(argc, argv, "F:c:df:ht:vy:C:")) != -1) {
+ while( (c=getopt(argc, argv, "F:c:df:hrt:vy:C:")) != -1) {
switch(c) {
case 'c':
qclass = optarg;
debuglevel = 2; /* at least VERB_DETAIL */
check_ub_res(ub_ctx_debuglevel(ctx, debuglevel));
break;
+ case 'r':
+ check_ub_res(ub_ctx_resolvconf(ctx, "/etc/resolv.conf"));
+ break;
case 't':
qtype = optarg;
break;