aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/noise.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-01-05 09:11:30 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-01-23 14:29:44 +0100
commit362396f8e6b9a706445014d7a3e195680bd66bde (patch)
tree90cd663e55c4e13e249d4d19fe60bd9b85665bd8 /src/noise.c
parentratelimiter: build tests with !IPV6 (diff)
downloadwireguard-monolithic-historical-362396f8e6b9a706445014d7a3e195680bd66bde.tar.xz
wireguard-monolithic-historical-362396f8e6b9a706445014d7a3e195680bd66bde.zip
noise: replace getnstimeofday64 with ktime_get_real_ts64
The former was just a wrapper around the latter, and so upstream is now removing it. Also adjust the compat kludge to deal with this. Reported-by: Alex Xu <alex@alxu.ca>
Diffstat (limited to '')
-rw-r--r--src/noise.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/noise.c b/src/noise.c
index fb65c4f..e629307 100644
--- a/src/noise.c
+++ b/src/noise.c
@@ -450,7 +450,7 @@ static void tai64n_now(u8 output[NOISE_TIMESTAMP_LEN])
{
struct timespec64 now;
- getnstimeofday64(&now);
+ ktime_get_real_ts64(&now);
/* https://cr.yp.to/libtai/tai64.html */
*(__be64 *)output = cpu_to_be64(0x400000000000000aULL + now.tv_sec);
*(__be32 *)(output + sizeof(__be64)) = cpu_to_be32(now.tv_nsec);