From c15511cf39ace14bdf94f71370eada5d70935846 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 17 Feb 2017 23:04:33 +0100 Subject: [PATCH] routing: Actually return the port when parsing node_announcements We parsed it, but did not pass it back out. --- daemon/routing.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/routing.c b/daemon/routing.c index 31d3eee13..7a6bcef33 100644 --- a/daemon/routing.c +++ b/daemon/routing.c @@ -576,6 +576,7 @@ bool read_ip(const tal_t *ctx, const u8 *addresses, char **hostname, inet_ntop(AF_INET, p, tempaddr, sizeof(tempaddr)); memcpy(&portnum, p + 4, sizeof(portnum)); *hostname = tal_strdup(ctx, tempaddr); + *port = be16_to_cpu(portnum); return true; case 2: if (len < 18) @@ -583,6 +584,7 @@ bool read_ip(const tal_t *ctx, const u8 *addresses, char **hostname, inet_ntop(AF_INET6, p, tempaddr, sizeof(tempaddr)); memcpy(&portnum, p + 16, sizeof(portnum)); *hostname = tal_strdup(ctx, tempaddr); + *port = be16_to_cpu(portnum); return true; default: /* BOLT #7: