diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-31 19:26:34 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-31 19:26:34 +0200 |
commit | 6c74768ea8725b918cdff41e634e2c43c56fa225 (patch) | |
tree | 163f0b2e7b02203346f1864d5fe9b97c966598b6 /src | |
parent | config: add new line for style (diff) | |
download | wireguard-monolithic-historical-6c74768ea8725b918cdff41e634e2c43c56fa225.tar.xz wireguard-monolithic-historical-6c74768ea8725b918cdff41e634e2c43c56fa225.zip |
timers: queue up killing ephemerals only if not already
Diffstat (limited to '')
-rw-r--r-- | src/timers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timers.c b/src/timers.c index cd37580..c1ef7f0 100644 --- a/src/timers.c +++ b/src/timers.c @@ -36,7 +36,7 @@ static void expired_retransmit_handshake(unsigned long ptr) skb_queue_purge(&peer->tx_packet_queue); /* We set a timer for destroying any residue that might be left * of a partial exchange. */ - if (likely(peer->timers_enabled)) + if (likely(peer->timers_enabled) && !timer_pending(&peer->timer_kill_ephemerals)) mod_timer(&peer->timer_kill_ephemerals, jiffies + (REJECT_AFTER_TIME * 3)); } else { ++peer->timer_handshake_attempts; |