aboutsummaryrefslogtreecommitdiffstats
path: root/src/wg_noise.h
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@noconroy.net>2021-04-20 12:09:39 +1000
committerMatt Dunwoodie <ncon@noconroy.net>2021-04-20 12:09:39 +1000
commit123c24e6afb3406dc3f091f5e6d69027a1f84c72 (patch)
treeffbdff97a6a051cd4c938ea2cf6bd2d1c5c7019a /src/wg_noise.h
parentwg_noise: assign index without lock then check (diff)
downloadwireguard-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.h5
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 *