projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
979acc4
)
Fix edge local addresses not being set when connections are established.
author
Etienne Dechamps
<etienne@edechamps.fr>
Sun, 18 Dec 2016 16:56:27 +0000
(16:56 +0000)
committer
Etienne Dechamps
<etienne@edechamps.fr>
Sun, 18 Dec 2016 17:14:16 +0000
(17:14 +0000)
This bug prevented nodes from advertising their local addresses, thus
breaking local discovery.
The regression was introduced in
ab13c14a1480561bb9f59ccfbbd6045e0484ce9c
.
src/protocol_auth.c
patch
|
blob
|
history
diff --git
a/src/protocol_auth.c
b/src/protocol_auth.c
index
224b6d8
..
d4705bd
100644
(file)
--- a/
src/protocol_auth.c
+++ b/
src/protocol_auth.c
@@
-888,8
+888,10
@@
bool ack_h(connection_t *c, const char *request) {
socklen_t local_salen = sizeof local_sa;
if (getsockname(c->socket, &local_sa.sa, &local_salen) < 0)
logger(DEBUG_ALWAYS, LOG_WARNING, "Could not get local socket address for connection with %s", c->name);
- else
+ else
{
sockaddr_setport(&local_sa, myport);
+ c->edge->local_address = local_sa;
+ }
c->edge->weight = (weight + c->estimated_weight) / 2;
c->edge->connection = c;
c->edge->options = c->options;