aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/send.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-06-23 19:02:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-06-23 19:12:51 +0200
commit68441fb05412baebbd17f407bf984ad7a81af630 (patch)
tree71fefcc3710232dea912be362cb83f383720edc0 /src/send.c
parentglobal: use ktime boottime instead of jiffies (diff)
downloadwireguard-monolithic-historical-68441fb05412baebbd17f407bf984ad7a81af630.tar.xz
wireguard-monolithic-historical-68441fb05412baebbd17f407bf984ad7a81af630.zip
global: use fast boottime instead of normal boottime
Generally if we're inaccurate by a few nanoseconds, it doesn't matter.
Diffstat (limited to 'src/send.c')
-rw-r--r--src/send.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/send.c b/src/send.c
index f5ee629..7a8bea1 100644
--- a/src/send.c
+++ b/src/send.c
@@ -28,7 +28,7 @@ static void packet_send_handshake_initiation(struct wireguard_peer *peer)
up_write(&peer->handshake.lock);
return; /* This function is rate limited. */
}
- peer->last_sent_handshake = ktime_get_boottime();
+ peer->last_sent_handshake = ktime_get_boot_fast_ns();
up_write(&peer->handshake.lock);
net_dbg_ratelimited("%s: Sending handshake initiation to peer %llu (%pISpfsc)\n", peer->device->dev->name, peer->internal_id, &peer->endpoint.addr);
@@ -72,7 +72,7 @@ void packet_send_handshake_response(struct wireguard_peer *peer)
struct message_handshake_response packet;
net_dbg_ratelimited("%s: Sending handshake response to peer %llu (%pISpfsc)\n", peer->device->dev->name, peer->internal_id, &peer->endpoint.addr);
- peer->last_sent_handshake = ktime_get_boottime();
+ peer->last_sent_handshake = ktime_get_boot_fast_ns();
if (noise_handshake_create_response(&packet, &peer->handshake)) {
cookie_add_mac_to_packet(&packet, sizeof(packet), peer);