From 1069f480827141063f63edccc0c434db4aa88d48 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 12 Mar 2019 11:10:55 +1030 Subject: [PATCH] connectd: fix binding to a UNIX domain socket. lightning_connectd(19780): STATUS_FAIL_INTERNAL_ERROR: Failed to bind on 2 socket: Address family not supported by protocol "Untested code is buggy code" Signed-off-by: Rusty Russell --- CHANGELOG.md | 2 ++ connectd/connectd.c | 2 +- tests/test_misc.py | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9190323c3..9e8a204c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ changes. ### Fixed +- `--bind-addr=` fixed for nodes using local sockets (eg. testing). + ### Security ## [0.7.0] - 2019-02-28: "Actually an Altcoin" diff --git a/connectd/connectd.c b/connectd/connectd.c index a131f6d38..c55b28c83 100644 --- a/connectd/connectd.c +++ b/connectd/connectd.c @@ -988,7 +988,7 @@ static struct wireaddr_internal *setup_listeners(const tal_t *ctx, addrun.sun_family = AF_UNIX; memcpy(addrun.sun_path, wa.u.sockname, sizeof(addrun.sun_path)); - fd = make_listen_fd(AF_INET, &addrun, sizeof(addrun), + fd = make_listen_fd(AF_UNIX, &addrun, sizeof(addrun), false); status_trace("Created socket listener on file %s", addrun.sun_path); diff --git a/tests/test_misc.py b/tests/test_misc.py index b47f16817..481cd70ab 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -566,7 +566,6 @@ def test_io_logging(node_factory, executor): assert any(l['type'] == 'IO_IN' for l in peerlog) -@pytest.mark.xfail(strict=True) def test_address(node_factory): if DEVELOPER: opts = {'dev-allow-localhost': None}