diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-08-01 15:59:37 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-08-03 00:14:18 +0200 |
commit | 9f4cc375561f34a6512f3789edbbd3d7a900145f (patch) | |
tree | 06c28c1a36d2b03c79fa6bbffb1a39cd49858dac /src/noise.h | |
parent | 7dbb9eec2638b41a0b95f3ca196d3c3a8550173c (diff) |
peer: ensure destruction doesn't race
Completely rework peer removal to ensure peers don't jump between
contexts and create races.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/noise.h')
-rw-r--r-- | src/noise.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/noise.h b/src/noise.h index 5804acf..be59587 100644 --- a/src/noise.h +++ b/src/noise.h @@ -95,7 +95,7 @@ struct wireguard_device; void noise_init(void); bool noise_handshake_init(struct noise_handshake *handshake, struct noise_static_identity *static_identity, const u8 peer_public_key[NOISE_PUBLIC_KEY_LEN], const u8 peer_preshared_key[NOISE_SYMMETRIC_KEY_LEN], struct wireguard_peer *peer); void noise_handshake_clear(struct noise_handshake *handshake); -void noise_keypair_put(struct noise_keypair *keypair); +void noise_keypair_put(struct noise_keypair *keypair, bool unreference_now); struct noise_keypair *noise_keypair_get(struct noise_keypair *keypair); void noise_keypairs_clear(struct noise_keypairs *keypairs); bool noise_received_with_keypair(struct noise_keypairs *keypairs, struct noise_keypair *received_keypair); |