Maintained by: NLnet Labs

unbound-host, -s "short" option feature request

Lonnie Abelbeck
Wed Mar 23 15:35:08 CET 2016


Hi,

We just added libunbound with unbound-host to our project, cross-compiled using Buildroot. Thanks for the excellent unbound project.

It would be nice if unbound-host had a -s option to limit output to just the result, as "+short" does with 'dig'.  Has this been requested before ?

For example, we are querying for a CNAME, currently...

cname="$(unbound-host -t CNAME "$host" | sed -n -r -e 's/^.* CNAME .* ([^ ]+)$/\1/p')"

But, this would be better...

cname="$(unbound-host -s -t CNAME "$host")"

Additionally, on an error no standard output should be generated, which makes this suggestion more than a couple line patch.

Possibly option -s would call short_output() instead of pretty_output() ? Or just add to pretty_output() ?

To be clear:
--
	printf("    -r			read forwarder information from /etc/resolv.conf\n");
	printf("      			breaks validation if the fwder does not do DNSSEC.\n");
+	printf("    -s			short form of answer, no other output.\n");
	printf("    -v			be more verbose, shows nodata and security.\n");
--

Reasonable ?

Lonnie