From 68441fb05412baebbd17f407bf984ad7a81af630 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 23 Jun 2018 19:02:18 +0200 Subject: global: use fast boottime instead of normal boottime Generally if we're inaccurate by a few nanoseconds, it doesn't matter. --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/device.c') diff --git a/src/device.c b/src/device.c index 7d5df17..df9189b 100644 --- a/src/device.c +++ b/src/device.c @@ -105,7 +105,7 @@ static int stop(struct net_device *dev) timers_stop(peer); noise_handshake_clear(&peer->handshake); noise_keypairs_clear(&peer->keypairs); - 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; } mutex_unlock(&wg->device_update_lock); skb_queue_purge(&wg->incoming_handshakes); -- cgit v1.2.3-59-g8ed1b