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
committerDamjan Marion <dmarion@me.com>2020-09-12 08:20:59 +0000
commitd75a2d12c431fcffba2a2b4d59f18c9cec483ed9 (patch)
treeac99425efe96e7a6a88e9cc25c7479e64e4c5ea1 /src/plugins/wireguard/wireguard_peer.c
parent8c6ba2957c985a1670e9fca6bc869008e6722364 (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
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 0dcc4e20e41..04b07d97652 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)
{