summaryrefslogtreecommitdiffstats
path: root/src/plugins/wireguard/wireguard_timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/wireguard/wireguard_timer.h')
-rw-r--r--src/plugins/wireguard/wireguard_timer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/wireguard/wireguard_timer.h b/src/plugins/wireguard/wireguard_timer.h
index 9d5c071c86e..ebde47e9067 100644
--- a/src/plugins/wireguard/wireguard_timer.h
+++ b/src/plugins/wireguard/wireguard_timer.h
@@ -57,6 +57,8 @@ void wg_timers_any_authenticated_packet_traversal (wg_peer_t * peer);
static inline bool
wg_birthdate_has_expired (f64 birthday_seconds, f64 expiration_seconds)
{
+ if (birthday_seconds == 0.0)
+ return true;
f64 now_seconds = vlib_time_now (vlib_get_main ());
return (birthday_seconds + expiration_seconds) < now_seconds;
}