Commit ad7cddd1 authored by Mark Andrews's avatar Mark Andrews

report when no NS records are found

parent 0f68656a
Pipeline #2090 passed with stages
in 1 minute and 22 seconds
......@@ -557,6 +557,7 @@ struct summary {
int deferred; /* was the printing deferred */
int done; /* we are done */
int type; /* recursive query lookup type */
int nodata; /* recursive query got nodata */
int nodataa; /* recursive query got nodata */
int nodataaaaa; /* recursive query got nodata */
int nxdomain; /* recursive query got nxdomain */
......@@ -777,6 +778,12 @@ printandfree(struct summary *summary) {
freesummary(summary);
return;
}
if (summary->type == ns_t_ns && summary->nodata) {
printf("%s.:", summary->zone);
printf(" no NS records found\n");
freesummary(summary);
return;
}
if (summary->done || summary->nodataa || summary->nodataaaaa) {
freesummary(summary);
......@@ -1732,8 +1739,10 @@ process(struct workitem *item, unsigned char *buf, int buflen) {
}
if (item->type == ns_t_ns && type == ns_t_ns &&
strcasecmp(item->summary->zone, name) == 0 &&
rcode == ns_r_noerror && ancount == 0)
rcode == ns_r_noerror && ancount == 0) {
item->summary->nodata = 1;
item->summary->done = 1;
}
/*
* NXDOMAIN?
......
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