aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-19 01:37:58 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-19 01:51:24 +0200
commita24b3e6e15ae1ea1291666e5da910caf43eedbaf (patch)
tree0e2ee0af7d2353a9747c60e1a3eb96bff5a5d285
parenttimers: clear send_keepalive timer on sending handshake response (diff)
downloadwireguard-monolithic-historical-a24b3e6e15ae1ea1291666e5da910caf43eedbaf.tar.xz
wireguard-monolithic-historical-a24b3e6e15ae1ea1291666e5da910caf43eedbaf.zip
timers: no need to clear keepalive in persistent keepalive
We do this after sending the keepalive anyway. This is something of a regression, though, since before we'd cancel and then send, but now we send and then cancel, so it introduces a potential race, but hopefully that isn't too big of a deal.
-rw-r--r--src/timers.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/timers.c b/src/timers.c
index bd22bf6..d3150de 100644
--- a/src/timers.c
+++ b/src/timers.c
@@ -103,11 +103,8 @@ static void expired_send_persistent_keepalive(struct timer_list *timer)
{
peer_get_from_timer(timer_persistent_keepalive);
- if (likely(peer->persistent_keepalive_interval)) {
- if (likely(timers_active(peer)))
- del_timer(&peer->timer_send_keepalive);
+ if (likely(peer->persistent_keepalive_interval))
packet_send_keepalive(peer);
- }
peer_put(peer);
}