From 89bac0d51617398505a469fc63d0a67e11a17def Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 28 Sep 2018 12:54:13 +0930 Subject: [PATCH] connectd: don't look for broken resolver if DNS disabled. It does leak some information, in theory. Signed-off-by: Rusty Russell --- connectd/connectd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/connectd/connectd.c b/connectd/connectd.c index a63868c16..c71b186e8 100644 --- a/connectd/connectd.c +++ b/connectd/connectd.c @@ -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;