From 7ebee8bc0c09256d896dedd58ce2522bbcf09b00 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 11 Jan 2021 22:38:18 +0100 Subject: Wireguard: Dump peers --- proto/wireguard/wireguard.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/proto/wireguard/wireguard.c b/proto/wireguard/wireguard.c index e0756eb8..442aabfb 100644 --- a/proto/wireguard/wireguard.c +++ b/proto/wireguard/wireguard.c @@ -431,6 +431,8 @@ wg_rt_notify(struct proto *P, struct channel *CH, struct network *n, if (!found) { peer = add_peer(dev, *pubkey); } + + dump_peer(peer); if (is_tunnel_ep) set_peer_tunnel_ep(peer, encap.ep.ip, encap.udp_dest_port); if (add_ip) @@ -550,10 +552,13 @@ wg_rt_notify(struct proto *P, struct channel *CH, struct network *n, if (found) { struct wg_allowedip *allowedip = alloca(sizeof(struct wg_allowedip)); init_allowed_ip(allowedip, ch->c.net_type, n); + dump_peer(peer); if (remove_allowed_ip(peer, allowedip)) { ip_addr ip = allowedip_to_ipa(allowedip); log(L_TRACE "WG: removed %I/%d", ip, allowedip->cidr); peer->flags |= WGPEER_REPLACE_ALLOWEDIPS; + + dump_peer(peer); } } } -- cgit v1.2.3