projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Preserve IPv6 scope_id in edges.
[tinc]
/
src
/
protocol_auth.c
diff --git
a/src/protocol_auth.c
b/src/protocol_auth.c
index
8fa9b93
..
091629a
100644
(file)
--- a/
src/protocol_auth.c
+++ b/
src/protocol_auth.c
@@
-516,7
+516,6
@@
static void send_everything(connection_t *c) {
bool ack_h(connection_t *c) {
char hisport[MAX_STRING_SIZE];
bool ack_h(connection_t *c) {
char hisport[MAX_STRING_SIZE];
- char *hisaddress;
int weight, mtu;
uint32_t options;
node_t *n;
int weight, mtu;
uint32_t options;
node_t *n;
@@
-585,9
+584,8
@@
bool ack_h(connection_t *c) {
c->edge = new_edge();
c->edge->from = myself;
c->edge->to = n;
c->edge = new_edge();
c->edge->from = myself;
c->edge->to = n;
- sockaddr2str(&c->address, &hisaddress, NULL);
- c->edge->address = str2sockaddr(hisaddress, hisport);
- free(hisaddress);
+ sockaddrcpy(&c->edge->address, &c->address);
+ sockaddr_setport(&c->edge->address, hisport);
c->edge->weight = (weight + c->estimated_weight) / 2;
c->edge->connection = c;
c->edge->options = c->options;
c->edge->weight = (weight + c->estimated_weight) / 2;
c->edge->connection = c;
c->edge->options = c->options;