aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/wireguard/wireguard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/wireguard/wireguard.c')
-rw-r--r--src/plugins/wireguard/wireguard.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/wireguard/wireguard.c b/src/plugins/wireguard/wireguard.c
index 926da2c06b4..5d73638f8f9 100644
--- a/src/plugins/wireguard/wireguard.c
+++ b/src/plugins/wireguard/wireguard.c
@@ -59,6 +59,13 @@ wireguard_register_post_node (vlib_main_t *vm)
vnet_crypto_register_post_node (vm, "wg6-input-post-node");
}
+void
+wg_secure_zero_memory (void *v, size_t n)
+{
+ static void *(*const volatile memset_v) (void *, int, size_t) = &memset;
+ memset_v (v, 0, n);
+}
+
static clib_error_t *
wg_init (vlib_main_t * vm)
{