diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-23 04:20:14 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-23 06:08:37 +0200 |
commit | d0bd6dc67d81236f66cb763c3d47dd6b5d7581a6 (patch) | |
tree | 6b3669f075d28267e50bda153a32e9b7ea9ff30b /src/peer.h | |
parent | tools: fix misspelling of strchrnul in comment (diff) | |
download | wireguard-monolithic-historical-d0bd6dc67d81236f66cb763c3d47dd6b5d7581a6.tar.xz wireguard-monolithic-historical-d0bd6dc67d81236f66cb763c3d47dd6b5d7581a6.zip |
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.
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -43,14 +43,14 @@ struct wireguard_peer { struct dst_cache endpoint_cache; rwlock_t endpoint_lock; struct noise_handshake handshake; - u64 last_sent_handshake; + ktime_t last_sent_handshake; struct work_struct transmit_handshake_work, clear_peer_work; struct cookie latest_cookie; struct hlist_node pubkey_hash; u64 rx_bytes, tx_bytes; struct timer_list timer_retransmit_handshake, timer_send_keepalive, timer_new_handshake, timer_zero_key_material, timer_persistent_keepalive; unsigned int timer_handshake_attempts; - unsigned long persistent_keepalive_interval; + u16 persistent_keepalive_interval; bool timers_enabled, timer_need_another_keepalive, sent_lastminute_handshake; struct timespec walltime_last_handshake; struct kref refcount; |