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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-12-02 16:52:56 +10:30
committed by Michael Schmoock
parent cf40e585c3
commit ff556fefc6

View File

@@ -1413,14 +1413,13 @@ static struct wireaddr_internal *setup_listeners(const tal_t *ctx,
/* Override with websocket port */ /* Override with websocket port */
addr = binding[i].u.wireaddr; addr = binding[i].u.wireaddr;
addr.port = daemon->websocket_port; addr.port = daemon->websocket_port;
handle_wireaddr_listen(daemon, &addr, false, true); if (handle_wireaddr_listen(daemon, &addr, true, true))
announced_some = true; announced_some = true;
/* FIXME: We don't report these bindings to /* FIXME: We don't report these bindings to
* lightningd, so they don't appear in * lightningd, so they don't appear in
* getinfo. */ * getinfo. */
} }
/* We add the websocket port to the announcement if it /* We add the websocket port to the announcement if it
* applies to any */ * applies to any */
if (announced_some) { if (announced_some) {