]> git.meshlink.io Git - meshlink/commitdiff
Ensure an invitation timeout of 0 means no invitations are valid.
authorGuus Sliepen <guus@meshlink.io>
Sun, 27 Oct 2019 13:47:38 +0000 (14:47 +0100)
committerGuus Sliepen <guus@meshlink.io>
Sun, 27 Oct 2019 15:30:19 +0000 (16:30 +0100)
src/conf.c

index 65ff2272ef68e50e293ad23cda5d4045315b3d7e..ac4d71a2bc9ad1db5547eac56ba958c77900bc6c 100644 (file)
@@ -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);