summaryrefslogtreecommitdiffstats
path: root/src/plugins/wireguard/wireguard_peer.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-09-10 08:49:10 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-09-16 11:03:59 +0000
commit6efd393965317d7c27fbd0a7f0046a7b29d37a9e (patch)
tree0503316c602505126a03ebc49b85b9ffc2377018 /src/plugins/wireguard/wireguard_peer.c
parent21cbdc75f21cde6ea83382e647c9da081d7d5f5b (diff)
wireguard: Fix for tunnel encap
Type: fix add UT for sneding handshale init and transport packets Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Iab1ed8864c666d5a0ae0b2364a9ca4de3c8770dc (cherry picked from commit d75a2d12c431fcffba2a2b4d59f18c9cec483ed9)
Diffstat (limited to 'src/plugins/wireguard/wireguard_peer.c')
-rwxr-xr-xsrc/plugins/wireguard/wireguard_peer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/wireguard/wireguard_peer.c b/src/plugins/wireguard/wireguard_peer.c
index 3985f4347b4..30adea82647 100755
--- a/src/plugins/wireguard/wireguard_peer.c
+++ b/src/plugins/wireguard/wireguard_peer.c
@@ -380,15 +380,16 @@ format_wg_peer (u8 * s, va_list * va)
peer = wg_peer_get (peeri);
key_to_base64 (peer->remote.r_public, NOISE_PUBLIC_KEY_LEN, key);
- s = format (s, "[%d] key:%=45s endpoint:[%U->%U] %U keep-alive:%d adj:%d",
+ s = format (s, "[%d] endpoint:[%U->%U] %U keep-alive:%d adj:%d",
peeri,
- key,
format_wg_peer_endpoint, &peer->src,
format_wg_peer_endpoint, &peer->dst,
format_vnet_sw_if_index_name, vnet_get_main (),
peer->wg_sw_if_index,
peer->persistent_keepalive_interval, peer->adj_index);
-
+ s = format (s, "\n key:%=s %U",
+ key, format_hex_bytes, peer->remote.r_public,
+ NOISE_PUBLIC_KEY_LEN);
s = format (s, "\n allowed-ips:");
vec_foreach (allowed_ip, peer->allowed_ips)
{