diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-01-11 22:38:18 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-01-12 23:34:17 +0100 |
commit | 7ebee8bc0c09256d896dedd58ce2522bbcf09b00 (patch) | |
tree | 5dd6657e72ef8d5fd8aa8304692e468858e95c3e | |
parent | 0bec41b24cd9899a33c00ef3b3134f8627bd9575 (diff) |
Wireguard: Dump peers
-rw-r--r-- | proto/wireguard/wireguard.c | 5 |
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); } } } |