diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-07-11 16:34:42 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-07-11 17:21:54 +0200 |
commit | fffe613427d70a7470d34b6dedcab9ffb8b6b667 (patch) | |
tree | 43c296d2fe6e5955a7964e7fe0640de9e7f795db /src/device.c | |
parent | netlink: enforce that unused bits of flags are zero (diff) | |
download | wireguard-monolithic-historical-fffe613427d70a7470d34b6dedcab9ffb8b6b667.tar.xz wireguard-monolithic-historical-fffe613427d70a7470d34b6dedcab9ffb8b6b667.zip |
noise: immediately rekey all peers after changing device private key
Reported-by: Derrick Pallas <derrick@pallas.us>
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c index d17dbf7..532d399 100644 --- a/src/device.c +++ b/src/device.c @@ -112,9 +112,7 @@ static int wg_stop(struct net_device *dev) wg_timers_stop(peer); wg_noise_handshake_clear(&peer->handshake); wg_noise_keypairs_clear(&peer->keypairs); - atomic64_set(&peer->last_sent_handshake, - ktime_get_coarse_boottime_ns() - - (u64)(REKEY_TIMEOUT + 1) * NSEC_PER_SEC); + wg_noise_reset_last_sent_handshake(&peer->last_sent_handshake); } mutex_unlock(&wg->device_update_lock); skb_queue_purge(&wg->incoming_handshakes); |