From 74eb4cc974f6d24370f439a1761dc4412d7fa58d Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 5 Jun 2016 15:20:57 +0200 Subject: [PATCH] Fix the previous commit. --- src/protocol_auth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 65c5e89e..31b1f1e7 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -866,7 +866,8 @@ bool ack_h(connection_t *c, const char *request) { c->edge = new_edge(); c->edge->from = myself; c->edge->to = n; - sockaddr_setport(&c->address, hisport); + sockaddrcpy(&c->edge->address, &c->address); + sockaddr_setport(&c->edge->address, hisport); sockaddr_t local_sa; socklen_t local_salen = sizeof local_sa; if (getsockname(c->socket, &local_sa.sa, &local_salen) < 0) -- 2.20.1