From: Miek Gieben Date: Thu, 8 Dec 2005 10:47:05 +0000 (+0000) Subject: be more dig like and default to NS . when no args are given. This is checks for name... X-Git-Tag: release-1.1.0~540 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebd31271d83ad8e83de41b35efbb65d3a9c54a0c;p=thirdparty%2Fldns.git be more dig like and default to NS . when no args are given. This is checks for name == NULL, which wasn't done yet --- diff --git a/drill/drill.c b/drill/drill.c index 8fcc6a60..7b6304b1 100644 --- a/drill/drill.c +++ b/drill/drill.c @@ -360,6 +360,14 @@ main(int argc, char *argv[]) /* it all fails assume it's a name */ name = argv[i]; } + /* check if name is defined, otherwise we have nothing to do */ + if (!name) { + /* act like dig and use for . NS */ + name = "."; + int_type = 0; + type = LDNS_RR_TYPE_NS; + } + /* defaults if not given */ if (int_clas == -1) { clas = LDNS_RR_CLASS_IN; @@ -368,6 +376,7 @@ main(int argc, char *argv[]) type = LDNS_RR_TYPE_A; } + /* if we're asking for DNSSEC records, act as if -D with given */ if (type == LDNS_RR_TYPE_DNSKEY || type == LDNS_RR_TYPE_RRSIG ||