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 | 81eb0e30f9b39e99d1bb7b56828fd32e50ea055a (patch) | |
tree | 7b9e212d2a73644bae8b09da164147a4491d98fa /src/peer.h | |
parent | noise: free peer references on failure (diff) | |
download | wireguard-monolithic-historical-81eb0e30f9b39e99d1bb7b56828fd32e50ea055a.tar.xz wireguard-monolithic-historical-81eb0e30f9b39e99d1bb7b56828fd32e50ea055a.zip |
peer: ensure destruction doesn't race
Completely rework peer removal to ensure peers don't jump between
contexts and create races.
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -58,6 +58,7 @@ struct wireguard_peer { struct list_head peer_list; u64 internal_id; struct napi_struct napi; + bool is_dead; }; struct wireguard_peer *peer_create(struct wireguard_device *wg, const u8 public_key[NOISE_PUBLIC_KEY_LEN], const u8 preshared_key[NOISE_SYMMETRIC_KEY_LEN]); |