diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-10-01 19:06:27 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-09-13 18:05:34 +0200 |
commit | 7191479a3653f69dae36eedba622a86aba19d9c9 (patch) | |
tree | 13869949c34301f92b82003a366389c2021df81c | |
parent | 590ba537906c03b4a07604aad243a330e3eb6f91 (diff) |
WIP debug
-rw-r--r-- | filter/filter.c | 2 | ||||
-rw-r--r-- | proto/wireguard/wireguard.c | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c index ff8a2a9b..5549c56c 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -44,6 +44,8 @@ #include "filter/f-inst.h" #include "filter/data.h" +#undef DEBUGGING + /* Exception bits */ enum f_exception { 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); } } } |