From: Guus Sliepen Date: Mon, 3 Feb 2020 16:43:50 +0000 (+0100) Subject: Clear reachability times in host config files received during a join. X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=8c5cd31cecf9d91d362199dc89effcfe59072e13 Clear reachability times in host config files received during a join. When a node joins an existing mesh, it gets passed one or more host config files from the inviter. However, these might contain non-zero reachability times, but the invitee has never seen those nodes, so clear them before storing the host config files. --- diff --git a/src/meshlink.c b/src/meshlink.c index 0fbcf153..d1987ab8 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -668,6 +668,10 @@ static bool finalize_join(meshlink_handle_t *mesh, const void *buf, uint16_t len } } + /* Clear the reachability times, since we ourself have never seen these nodes yet */ + n->last_reachable = 0; + n->last_unreachable = 0; + if(!node_write_config(mesh, n)) { free_node(n); return false;