X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=31b1f1e7253964929973a29a523595d1cd97d8e6;hp=65c5e89ef227a60c31aca7e42916da6ff3ccf7fe;hb=74eb4cc974f6d24370f439a1761dc4412d7fa58d;hpb=ab13c14a1480561bb9f59ccfbbd6045e0484ce9c 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)