From 464188f9456d1456b1869aacd03a41163848b30a Mon Sep 17 00:00:00 2001 From: Lyn Date: Mon, 13 Jan 2025 16:44:47 +0100 Subject: [PATCH] integer overflow fix --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index caf3b78..c4e65c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -578,7 +578,7 @@ impl State { // if peer is connected and endpoint is the correct one, // set higher keepalive and then skip reconfiguring it - if !bad_endpoint && now < peer.last_seen + TIMEOUT.as_secs() { + if !bad_endpoint && peer.last_seen != u64::MAX && now < peer.last_seen + TIMEOUT.as_secs() { Command::new("wg") .args([ "set",