aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/noise.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/noise.c')
-rw-r--r--src/noise.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/noise.c b/src/noise.c
index 4160fc0..d0a337a 100644
--- a/src/noise.c
+++ b/src/noise.c
@@ -775,8 +775,8 @@ bool wg_noise_handshake_begin_session(struct noise_handshake *handshake,
handshake_zero(handshake);
rcu_read_lock_bh();
- if (likely(!container_of(handshake, struct wg_peer,
- handshake)->is_dead)) {
+ if (likely(!READ_ONCE(container_of(handshake, struct wg_peer,
+ handshake)->is_dead))) {
add_new_keypair(keypairs, new_keypair);
net_dbg_ratelimited("%s: Keypair %llu created for peer %llu\n",
handshake->entry.peer->device->dev->name,