Commit 470c508b authored by Mark Andrews's avatar Mark Andrews

print 'all ok'

parent 05d7adb3
...@@ -74,6 +74,7 @@ static int udp6 = -1; ...@@ -74,6 +74,7 @@ static int udp6 = -1;
static int ipv4only = 0; static int ipv4only = 0;
static int ipv6only = 0; static int ipv6only = 0;
static int allok = 0;
static int bad = 0; static int bad = 0;
static int badtag = 0; static int badtag = 0;
static int ednsonly = 0; static int ednsonly = 0;
...@@ -545,6 +546,9 @@ printandfree(struct summary *summary) { ...@@ -545,6 +546,9 @@ printandfree(struct summary *summary) {
x = -1; x = -1;
printf("%s. @%s (%s.):", summary->zone, addrbuf, summary->ns); printf("%s. @%s (%s.):", summary->zone, addrbuf, summary->ns);
if (allok && summary->allok)
printf(" all ok");
else
for (i = 0; i < sizeof(opts)/sizeof(opts[0]); i++) { for (i = 0; i < sizeof(opts)/sizeof(opts[0]); i++) {
if (opts[i].what != 0 && (opts[i].what & what) == 0) if (opts[i].what != 0 && (opts[i].what & what) == 0)
continue; continue;
...@@ -2019,10 +2023,11 @@ main(int argc, char **argv) { ...@@ -2019,10 +2023,11 @@ main(int argc, char **argv) {
int done = 0; int done = 0;
char *end; char *end;
while ((n = getopt(argc, argv, "46bBcdeEfi:m:opr:st")) != -1) { while ((n = getopt(argc, argv, "46abBcdeEfi:m:opr:st")) != -1) {
switch (n) { switch (n) {
case '4': ipv4only = 1; ipv6only = 0; break; case '4': ipv4only = 1; ipv6only = 0; break;
case '6': ipv6only = 1; ipv4only = 0; break; case '6': ipv6only = 1; ipv4only = 0; break;
case 'a': allok = 1; break;
case 'b': bad = 1; break; case 'b': bad = 1; break;
case 'B': badtag = 1; break; case 'B': badtag = 1; break;
case 'c': what |= COMM; break; case 'c': what |= COMM; break;
...@@ -2050,6 +2055,7 @@ main(int argc, char **argv) { ...@@ -2050,6 +2055,7 @@ main(int argc, char **argv) {
"[-r server]\n"); "[-r server]\n");
printf("\t-4: IPv4 servers only\n"); printf("\t-4: IPv4 servers only\n");
printf("\t-6: IPv6 servers only\n"); printf("\t-6: IPv6 servers only\n");
printf("\t-a: only emit all ok\n");
printf("\t-b: only emit bad servers\n"); printf("\t-b: only emit bad servers\n");
printf("\t-B: only emit bad tests\n"); printf("\t-B: only emit bad tests\n");
printf("\t-c: add common queries\n"); printf("\t-c: add common queries\n");
......
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