connectd: don't look for broken resolver if DNS disabled.

It does leak some information, in theory.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-09-28 12:54:13 +09:30
parent 9207e48246
commit 89bac0d516

View File

@ -156,6 +156,12 @@ static bool broken_resolver(struct daemon *daemon)
struct addrinfo hints;
const char *hostname = "nxdomain-test.doesntexist";
int err;
if (!daemon->use_dns) {
daemon->broken_resolver_response = NULL;
return false;
}
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;