summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2021-01-11 22:38:18 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2021-01-12 23:34:17 +0100
commit7ebee8bc0c09256d896dedd58ce2522bbcf09b00 (patch)
tree5dd6657e72ef8d5fd8aa8304692e468858e95c3e
parent0bec41b24cd9899a33c00ef3b3134f8627bd9575 (diff)
Wireguard: Dump peers
-rw-r--r--proto/wireguard/wireguard.c5
1 files changed, 5 insertions, 0 deletions
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);
}
}
}