From e0d14e978f5ec1608e2ba610258347ab86103836 Mon Sep 17 00:00:00 2001 From: thorkill Date: Tue, 7 Jul 2015 21:19:26 +0200 Subject: [PATCH] Make sure we do not allocate new edge when talking to old nodes and the same edge already exists When tinc gets ADD_EDGE from older versions it will allocate new edge in protocol_edge.c:189 due to missed case in lines 149-171 where local_address is not defined. --- src/protocol_edge.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/protocol_edge.c b/src/protocol_edge.c index 00511dfa..0ee48235 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -181,6 +181,10 @@ bool add_edge_h(connection_t *c, const char *request) { forward_request(c, request); return true; + } else { + logger(DEBUG_PROTOCOL, LOG_WARNING, "%s:%d %s -> %s - got edge we know from older version? (%d.%d)", + __FUNCTION__, __LINE__, e->from->name, e->to->name, c->protocol_major, c->protocol_minor); + return true; } } else {