summaryrefslogtreecommitdiffstats
path: root/src/wireguard.h
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@mail.noconroy.net>2019-05-22 01:31:05 +1000
committerMatt Dunwoodie <ncon@mail.noconroy.net>2019-05-22 02:06:23 +1000
commit9138dba3d94a32c58db9aef907045e0841c93d76 (patch)
tree31afb4a76bf39b329486ba84302662bdf64af395 /src/wireguard.h
parentLimit initiation retries (diff)
downloadwireguard-openbsd-9138dba3d94a32c58db9aef907045e0841c93d76.tar.xz
wireguard-openbsd-9138dba3d94a32c58db9aef907045e0841c93d76.zip
Make timeouts more idiomatic
This is going to be a simpler way to manage timeouts, where they are created and deleted as needed. For the time being, if_wg.c just removes them from the timeout list, however that is unnecessarily inefficient. That will eventually use a flag on the wg_timeout to indicate if it should run or not.
Diffstat (limited to 'src/wireguard.h')
-rw-r--r--src/wireguard.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wireguard.h b/src/wireguard.h
index 6d9c0cbf87c..adfc2a0c72d 100644
--- a/src/wireguard.h
+++ b/src/wireguard.h
@@ -42,6 +42,7 @@ enum wg_task {
WG_TASK_KEEPALIVE,
WG_TASK_BROKEN,
WG_TASK_CLEANUP,
+ WG_TASK_PKA,
WG_TASK_NUM,
};
@@ -86,10 +87,9 @@ struct wg_peer {
enum wg_role role;
} p_curr_sess, p_prev_sess;
+ bool p_wait_ack;
u_int8_t p_init_retry_count;
u_int16_t p_persistent_keepalive;
- bool p_require_keepalive, p_require_broken;
- struct timespec p_lastrecv;
struct timespec p_lastinit;
struct wg_cookie_value {
@@ -116,7 +116,7 @@ extern void (*const wg_task_fn[WG_TASK_NUM])(struct wg_peer *, struct mbuf_list
/* Upcall is a struct to store callbacks for wireguard */
struct wg_upcall {
void (*uc_register_id)(struct wg_peer *, u_int32_t, bool);
- void (*uc_run_task_in)(struct wg_peer *, enum wg_task, struct timespec *);
+ void (*uc_run_task_in)(struct wg_peer *, enum wg_task, u_int16_t);
void *uc_arg;
u_int8_t *(*uc_getpubkey)(void *);