summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-10-25 22:27:30 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-10-25 22:27:30 +0100
commit950d970671a9432a5525dc3781a9095c04a50331 (patch)
treea17562be192f20ab1273749182fed0436148e084 /sys/src/cmd/ip
parent9bb519ac5023238572e31dd69d4f6dc3f45dfa26 (diff)
ip/tinc: fix reportedge()
supplying a non-ip address in ADD_EDGE crashes the unix tincd. the reason was that we where misreporting ADD_EDGE messages; ignoring the information from our peers; and always supplying the Address string from our configuration instead of the connections ip address. now we just report the edge information as is.
Diffstat (limited to 'sys/src/cmd/ip')
-rw-r--r--sys/src/cmd/ip/tinc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/ip/tinc.c b/sys/src/cmd/ip/tinc.c
index 5d0122121..94a5e0ec6 100644
--- a/sys/src/cmd/ip/tinc.c
+++ b/sys/src/cmd/ip/tinc.c
@@ -377,9 +377,9 @@ reportedge(Conn *c, Edge *e)
consend(c, "%d %x %s %s", DEL_EDGE, rand(),
e->src->name, e->dst->name);
} else
- consend(c, "%d %x %s %s %s %d %x %d", ADD_EDGE, rand(),
+ consend(c, "%d %x %s %s %I %d %x %d", ADD_EDGE, rand(),
e->src->name, e->dst->name,
- e->dst->addr, e->dst->port, e->dst->options, e->weight);
+ e->ip, e->port, e->options, e->weight);
}
void