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 | 0ee5757d36ef3ef02646e34eb465b52a33fa910d (patch) | |
tree | 74ad1c16b21c2d0c05b71dff75693c3529f90aba | |
parent | f22844c57bdd50dcad46373b76d47b90aa66c6dd (diff) |
timers: queue up killing ephemerals only if not already
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-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; |