From 28936fda22cd778c6cdcd85468947bbbe8ed4256 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 27 Oct 2019 14:47:38 +0100 Subject: [PATCH] Ensure an invitation timeout of 0 means no invitations are valid. --- src/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index 65ff2272..ac4d71a2 100644 --- a/src/conf.c +++ b/src/conf.c @@ -843,7 +843,7 @@ bool invitation_read(meshlink_handle_t *mesh, const char *conf_subdir, const cha return false; } - if(mesh->loop.now.tv_sec > st.st_mtime + mesh->invitation_timeout) { + if(mesh->loop.now.tv_sec >= st.st_mtime + mesh->invitation_timeout) { logger(mesh, MESHLINK_ERROR, "Peer tried to use an outdated invitation file %s\n", name); fclose(f); unlink(used_path); -- 2.39.2