From f8b3991e881a64f47412082ae15c08285eb6880b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 23 Jun 2018 04:20:14 +0200 Subject: global: use ktime boottime instead of jiffies Since this is a network protocol, expirations need to be accounted for, even across system suspend. On real systems, this isn't a problem, since we're clearing all keys before suspend. But on Android, where we don't do that, this is something of a problem. So, we switch to using boottime instead of jiffies. Signed-off-by: Jason A. Donenfeld --- src/noise.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/noise.h') diff --git a/src/noise.h b/src/noise.h index 5eb3a88..ec1a59d 100644 --- a/src/noise.h +++ b/src/noise.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include union noise_counter { @@ -31,7 +31,7 @@ union noise_counter { struct noise_symmetric_key { u8 key[NOISE_SYMMETRIC_KEY_LEN]; union noise_counter counter; - u64 birthdate; + ktime_t birthdate; bool is_valid; }; @@ -72,7 +72,7 @@ struct noise_handshake { struct index_hashtable_entry entry; enum noise_handshake_state state; - u64 last_initiation_consumption; + ktime_t last_initiation_consumption; struct noise_static_identity *static_identity; -- cgit v1.2.3