Commit 00d92de6 authored by Michał Kępień's avatar Michał Kępień Committed by Evan Hunt
Browse files

Skip lookup when no acceptable nameservers are found

If no lookup-specific nameservers are provided and no acceptable
nameservers are found in /etc/resolv.conf (e.g. when it only contains
IPv6 nameserver addresses and "-4" is used or vice versa), print a
warning and skip the lookup instead of hanging indefinitely.
parent 9a5c21b4
......@@ -4030,6 +4030,13 @@ do_lookup(dig_lookup_t *lookup) {
REQUIRE(lookup != NULL);
debug("do_lookup()");
if (ISC_LIST_EMPTY(lookup->my_server_list)) {
printf(";; No acceptable nameservers\n");
check_next_lookup(lookup);
return;
}
lookup->pending = true;
query = ISC_LIST_HEAD(lookup->q);
if (query != NULL) {
......
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