From 8c5cd31cecf9d91d362199dc89effcfe59072e13 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Mon, 3 Feb 2020 17:43:50 +0100 Subject: [PATCH] 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. --- src/meshlink.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.5