summaryrefslogtreecommitdiffhomepage
path: root/src/peer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peer.c b/src/peer.c
index 6c61b7f..ece5e7d 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -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 = get_jiffies_64() - REKEY_TIMEOUT - HZ;
+ peer->last_sent_handshake = ktime_sub_ns(ktime_get_boottime(), (u64)(REKEY_TIMEOUT + 1) * NSEC_PER_SEC);
pr_debug("%s: Peer %llu created\n", wg->dev->name, peer->internal_id);
return peer;
}