aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-18 20:54:45 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-18 20:54:45 +0200
commite7e6819d59ab4c76b28a6d296123256063000d1c (patch)
tree9e80014b38142eace5288504e2b895b559d80459
parenttools: fix errno propagation and messages (diff)
downloadwireguard-monolithic-historical-e7e6819d59ab4c76b28a6d296123256063000d1c.tar.xz
wireguard-monolithic-historical-e7e6819d59ab4c76b28a6d296123256063000d1c.zip
timers: reinitialize state on init
-rw-r--r--src/timers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/timers.c b/src/timers.c
index dee556d..327a0c1 100644
--- a/src/timers.c
+++ b/src/timers.c
@@ -186,6 +186,9 @@ void timers_init(struct wireguard_peer *peer)
timer_setup(&peer->timer_zero_key_material, expired_zero_key_material, 0);
timer_setup(&peer->timer_persistent_keepalive, expired_send_persistent_keepalive, 0);
INIT_WORK(&peer->clear_peer_work, queued_expired_zero_key_material);
+ peer->timer_handshake_attempts = 0;
+ peer->sent_lastminute_handshake = false;
+ peer->timer_need_another_keepalive = false;
}
void timers_stop(struct wireguard_peer *peer)