From: Guus Sliepen Date: Thu, 23 May 2019 21:20:01 +0000 (+0200) Subject: Autoconnect to reachable nodes without known public keys X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=9e588a7b6cb4fff70f223bab1ba3120acff1f18b Autoconnect to reachable nodes without known public keys We must allow the autoconnect algorithm to try connections to nodes that are online but for which we don't have a public key, otherwise we risk that no connections are formed at all, except to the inviting node. --- diff --git a/src/net.c b/src/net.c index 348c9e34..a1cccbdf 100644 --- a/src/net.c +++ b/src/net.c @@ -500,7 +500,7 @@ static void periodic_handler(event_loop_t *loop, void *data) { } } - if(!node_read_public_key(mesh, connect_to)) { + if(!connect_to->status.reachable && !node_read_public_key(mesh, connect_to)) { logger(mesh, MESHLINK_DEBUG, "* skip autoconnect since we don't know this node's public key"); skip = true; }