From 1ab9a5def6dc09bde25d2ee6c6fa4be6c33608a8 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 10 May 2018 12:08:24 +0930 Subject: [PATCH] wireaddr: fix parsing of empty address with no port. Port should become the default in not specified. Signed-off-by: Rusty Russell --- common/wireaddr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/wireaddr.c b/common/wireaddr.c index 97b19e81b..d54634226 100644 --- a/common/wireaddr.c +++ b/common/wireaddr.c @@ -394,6 +394,7 @@ bool parse_wireaddr_internal(const char *arg, struct wireaddr_internal *addr, /* An empty string means IPv4 and IPv6 (which under Linux by default * means just IPv6, and IPv4 gets autobound). */ + wildport = port; if (wildcard_ok && separate_address_and_port(tmpctx, arg, &ip, &wildport) && streq(ip, "")) {