integer overflow fix

This commit is contained in:
Lyn 2025-01-13 16:44:47 +01:00
parent 3943972be3
commit 464188f945

View file

@ -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",