diff options
author | Linus Nordberg <linus@nordberg.se> | 2019-09-29 22:08:29 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2019-09-29 22:36:19 +0200 |
commit | 6dcf16386f710304af2a00706f24f683305b8825 (patch) | |
tree | 78da952e9b26949d4078e7da40bb058281e6359c /lease.h | |
parent | Add draft of protocol specification (diff) | |
download | wg-dynamic-6dcf16386f710304af2a00706f24f683305b8825.tar.xz wg-dynamic-6dcf16386f710304af2a00706f24f683305b8825.zip |
Remove allowed-ips from peers as leases expire
Diffstat (limited to 'lease.h')
-rw-r--r-- | lease.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -13,6 +13,8 @@ #include "common.h" #include "netlink.h" +#define WG_DYNAMIC_LEASE_CHUNKSIZE 256 + struct wg_dynamic_lease { time_t start_real; time_t start_mono; @@ -54,7 +56,7 @@ bool extend_lease(struct wg_dynamic_lease *lease, uint32_t leasetime); /* Refreshes all leases, meaning expired ones will be removed. Returns the * amount of seconds until the next lease will expire, or at most INT_MAX/1000. */ -int leases_refresh(); +int leases_refresh(void (*update_cb)(wg_key *, int)); /* * Updates all pools with information from the mnl socket nlsock. |