Browse Source

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>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
1ab9a5def6
  1. 1
      common/wireaddr.c

1
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, "")) {

Loading…
Cancel
Save