From ff556fefc623ef0e53b375f08fc6ea126680edc5 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 2 Dec 2021 16:52:56 +1030 Subject: [PATCH] connectd: fix websocket binding when we're doing both IPv4 and IPv6 on same port. We would fail connectd when listening on the IPv6 version failed; instead we should allow that. Changelog-Experimental: experimental-websocket-port fixed to work with default addresses. Signed-off-by: Rusty Russell --- connectd/connectd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/connectd/connectd.c b/connectd/connectd.c index 9a56abe2f..677f9bd0b 100644 --- a/connectd/connectd.c +++ b/connectd/connectd.c @@ -1413,14 +1413,13 @@ static struct wireaddr_internal *setup_listeners(const tal_t *ctx, /* Override with websocket port */ addr = binding[i].u.wireaddr; addr.port = daemon->websocket_port; - handle_wireaddr_listen(daemon, &addr, false, true); - announced_some = true; + if (handle_wireaddr_listen(daemon, &addr, true, true)) + announced_some = true; /* FIXME: We don't report these bindings to * lightningd, so they don't appear in * getinfo. */ } - /* We add the websocket port to the announcement if it * applies to any */ if (announced_some) {