summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-05-31 19:26:34 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-05-31 19:26:34 +0200
commit0ee5757d36ef3ef02646e34eb465b52a33fa910d (patch)
tree74ad1c16b21c2d0c05b71dff75693c3529f90aba /src
parentf22844c57bdd50dcad46373b76d47b90aa66c6dd (diff)
timers: queue up killing ephemerals only if not already
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r--src/timers.c2
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;