From 950d970671a9432a5525dc3781a9095c04a50331 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 25 Oct 2020 22:27:30 +0100 Subject: 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. --- sys/src/cmd/ip/tinc.c | 4 ++-- 1 file 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 -- cgit v1.2.3