summaryrefslogtreecommitdiffstats
path: root/src/wireguard.h
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@mail.noconroy.net>2019-05-21 20:00:32 +1000
committerMatt Dunwoodie <ncon@mail.noconroy.net>2019-05-21 22:11:25 +1000
commite0218fb546f59417fb240c2b301ee3e916ef4aaf (patch)
tree843707702f582b9d49d399caac776c3f006a6026 /src/wireguard.h
parentUse wireguard.h functions, store peer key in wg_key_pubkey (diff)
downloadwireguard-openbsd-e0218fb546f59417fb240c2b301ee3e916ef4aaf.tar.xz
wireguard-openbsd-e0218fb546f59417fb240c2b301ee3e916ef4aaf.zip
Add persistent keepalive support to kernel
The persistent keepalive piggybacks on the regular keepalive timeout. I'm not exactly sure how keepalives work in the linux kernel module, however in this situation we send the regular keepalive after 10 seconds, and then every p_persistent_keepalive seconds after that.
Diffstat (limited to 'src/wireguard.h')
-rw-r--r--src/wireguard.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wireguard.h b/src/wireguard.h
index 46ddb40c058..0d00a623ef5 100644
--- a/src/wireguard.h
+++ b/src/wireguard.h
@@ -86,6 +86,7 @@ struct wg_peer {
enum wg_role role;
} p_curr_sess, p_prev_sess;
+ u_int16_t p_persistent_keepalive;
bool p_require_keepalive, p_require_broken;
struct timespec p_lastrecv;
struct timespec p_lastinit;
@@ -131,6 +132,7 @@ void wg_peer_cleanup(struct wg_peer *);
/* Get/Set functions */
void wg_peer_set_key(struct wg_peer *, const enum wg_key_type, const u_int8_t [WG_KEY_SIZE]);
+void wg_peer_set_pka(struct wg_peer *, u_int16_t);
void wg_peer_get_key(struct wg_peer *, const enum wg_key_type, u_int8_t [WG_KEY_SIZE]);
void wg_peer_get_state(struct wg_peer *, struct timespec *, enum wg_role *);