← Commit list

8c3b520d4

Jo-Philipp Wich
Jo-Philipp Wich
2019-10-27
SUCCESS Duration: 158s

Subject

nslookup: handle replies without RRs

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/nslookup.c+7 -1
@@ -615,9 +615,15 @@ static int send_queries(struct ns *ns)
G.query[qn].name, rcodes[rcode]);
G.exitcode = EXIT_FAILURE;
} else {
- if (parse_reply(reply, recvlen) < 0) {
+ switch (parse_reply(reply, recvlen)) {
+ case -1:
printf("*** Can't find %s: Parse error\n", G.query[qn].name);
G.exitcode = EXIT_FAILURE;
+ break;
+
+ case 0:
+ printf("*** Can't find %s: No answer\n", G.query[qn].name);
+ break;
}
}
bb_putchar('\n');