diff options
author | 2020-09-14 11:36:01 +0700 | |
---|---|---|
committer | 2020-09-24 18:54:26 +0000 | |
commit | 48d81b58dfc1b4c93a44e07ed61cbe73458623a2 (patch) | |
tree | 95a940c749902a0eb91a371bb81e6fddbbe0cba2 /src/plugins/wireguard/wireguard_api.c | |
parent | c359dfa1869d888d934fd0fd362ece21f9ffc26c (diff) |
wireguard: add handoff node
All timer and control plane functions happen from main thread
Type: fix
Change-Id: I4fc333c644485cd17e6f426493feef91688d9b24
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
(cherry picked from commit 8eb69407c8075e101b773d5a27ea21bd3fc906d7)
Diffstat (limited to 'src/plugins/wireguard/wireguard_api.c')
-rwxr-xr-x | src/plugins/wireguard/wireguard_api.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/wireguard/wireguard_api.c b/src/plugins/wireguard/wireguard_api.c index 8bbacddaf45..27ed6ea05da 100755 --- a/src/plugins/wireguard/wireguard_api.c +++ b/src/plugins/wireguard/wireguard_api.c @@ -97,15 +97,17 @@ wireguard_if_send_details (index_t wgii, void *data) vl_api_wireguard_interface_details_t *rmp; wg_deatils_walk_t *ctx = data; const wg_if_t *wgi; + const noise_local_t *local; wgi = wg_if_get (wgii); + local = noise_local_get (wgi->local_idx); rmp = vl_msg_api_alloc_zero (sizeof (*rmp)); rmp->_vl_msg_id = htons (VL_API_WIREGUARD_INTERFACE_DETAILS + wg_main.msg_id_base); clib_memcpy (rmp->interface.private_key, - wgi->local.l_private, NOISE_PUBLIC_KEY_LEN); + local->l_private, NOISE_PUBLIC_KEY_LEN); rmp->interface.sw_if_index = htonl (wgi->sw_if_index); rmp->interface.port = htons (wgi->port); ip_address_encode2 (&wgi->src_ip, &rmp->interface.src_ip); |