mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
wireaddr: fix parsing of empty address with no port.
Port should become the default in not specified. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
cca791d1cb
commit
1ab9a5def6
@ -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
|
/* An empty string means IPv4 and IPv6 (which under Linux by default
|
||||||
* means just IPv6, and IPv4 gets autobound). */
|
* means just IPv6, and IPv4 gets autobound). */
|
||||||
|
wildport = port;
|
||||||
if (wildcard_ok
|
if (wildcard_ok
|
||||||
&& separate_address_and_port(tmpctx, arg, &ip, &wildport)
|
&& separate_address_and_port(tmpctx, arg, &ip, &wildport)
|
||||||
&& streq(ip, "")) {
|
&& streq(ip, "")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user