diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-23 19:02:18 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-23 19:12:51 +0200 |
commit | 245f0bd331330c80e28e56e95c85ebacf7570ac2 (patch) | |
tree | d863021b9fe555e3d77a4d84baa553d94ea63c0c /src/peer.c | |
parent | f8b3991e881a64f47412082ae15c08285eb6880b (diff) |
global: use fast boottime instead of normal boottime
Generally if we're inaccurate by a few nanoseconds, it doesn't matter.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/peer.c')
-rw-r--r-- | src/peer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -55,7 +55,7 @@ struct wireguard_peer *peer_create(struct wireguard_device *wg, const u8 public_ skb_queue_head_init(&peer->staged_packet_queue); list_add_tail(&peer->peer_list, &wg->peer_list); pubkey_hashtable_add(&wg->peer_hashtable, peer); - peer->last_sent_handshake = ktime_sub_ns(ktime_get_boottime(), (u64)(REKEY_TIMEOUT + 1) * NSEC_PER_SEC); + peer->last_sent_handshake = ktime_get_boot_fast_ns() - (u64)(REKEY_TIMEOUT + 1) * NSEC_PER_SEC; pr_debug("%s: Peer %llu created\n", wg->dev->name, peer->internal_id); return peer; } |