From 300303a8f2f1571a0253eac99869ab4842128629 Mon Sep 17 00:00:00 2001 From: Michael Schmoock Date: Wed, 29 Sep 2021 11:40:05 +0200 Subject: [PATCH] options: fix respect --disable-dns when parsing wireaddress Changelog-Fixed: Options: Respect --always-use-proxy AND --disable-dns when parsing wireaddresses to listen on. --- lightningd/options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lightningd/options.c b/lightningd/options.c index 57d9ec85f..e186b6e1c 100644 --- a/lightningd/options.c +++ b/lightningd/options.c @@ -188,12 +188,14 @@ static char *opt_add_addr_withtype(const char *arg, { char const *err_msg; struct wireaddr_internal wi; + bool dns_ok; assert(arg != NULL); + dns_ok = !ld->always_use_proxy && ld->config.use_dns; if (!parse_wireaddr_internal(arg, &wi, ld->portnum, - wildcard_ok, !ld->always_use_proxy, false, + wildcard_ok, dns_ok, false, deprecated_apis, &err_msg)) { return tal_fmt(NULL, "Unable to parse address '%s': %s", arg, err_msg); }