diff options
author | Matt Dunwoodie <ncon@noconroy.net> | 2021-04-20 12:09:39 +1000 |
---|---|---|
committer | Matt Dunwoodie <ncon@noconroy.net> | 2021-04-20 12:09:39 +1000 |
commit | 123c24e6afb3406dc3f091f5e6d69027a1f84c72 (patch) | |
tree | ffbdff97a6a051cd4c938ea2cf6bd2d1c5c7019a /src/wg_noise.h | |
parent | wg_noise: assign index without lock then check (diff) | |
download | wireguard-freebsd-123c24e6afb3406dc3f091f5e6d69027a1f84c72.tar.xz wireguard-freebsd-123c24e6afb3406dc3f091f5e6d69027a1f84c72.zip |
wg_noise: insert/remove peer independent of alloc/destroy
This is needed, to remove the peer from the public key hashtable before
calling noise_remote_destroy. This will prevent any incoming handshakes
from starting in that time. It also cleans up the insert path to make it
more like it was before the wg_noise EPOCH changes.
Signed-off-by: Matt Dunwoodie <ncon@noconroy.net>
Diffstat (limited to '')
-rw-r--r-- | src/wg_noise.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wg_noise.h b/src/wg_noise.h index d70d0be..893f62c 100644 --- a/src/wg_noise.h +++ b/src/wg_noise.h @@ -45,8 +45,9 @@ int noise_local_keys(struct noise_local *, /* Remote configuration */ struct noise_remote * noise_remote_alloc(struct noise_local *, void *, - const uint8_t[NOISE_PUBLIC_KEY_LEN], - const uint8_t[NOISE_SYMMETRIC_KEY_LEN]); + const uint8_t[NOISE_PUBLIC_KEY_LEN]); +void noise_remote_enable(struct noise_remote *); +void noise_remote_disable(struct noise_remote *); struct noise_remote * noise_remote_lookup(struct noise_local *, const uint8_t[NOISE_PUBLIC_KEY_LEN]); struct noise_remote * |