Files
lightning/common
Rusty Russell eb0603bd13 wireaddr: rework port parsing for weird addresses.
We save wireaddr to databases as a string (which is pretty dumb) but
it turned out that my local node saved '[::ffff:127.0.0.1]:49150'
which our parser can't parse.

Thus I've reworked the parser to make fewer assumptions:
parse_ip_port() is renamed to separate_address_and_port() and is now
far more accepting of different forms, and returns failure only on
grossly malformed strings.  Otherwise it overwrites its *port arg only
if there's a port specified.  I also made it static.

Then fromwire_wireaddr() hands the resulting address to inet_pton to
figure out if it's actually valid.

Cc: William Casarin <jb55@jb55.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-08 19:14:21 +01:00
..
2017-11-24 13:22:18 +01:00
2017-12-08 13:07:20 +01:00
2018-01-29 04:46:54 +00:00
2018-01-29 04:46:54 +00:00
2018-01-29 04:46:54 +00:00
2017-10-09 11:51:13 +10:30
2017-11-23 23:10:08 +01:00
2017-11-16 17:40:57 +01:00
2017-12-20 12:43:10 +01:00
2017-12-20 12:43:10 +01:00
2018-01-29 04:46:54 +00:00