From 0ee5757d36ef3ef02646e34eb465b52a33fa910d Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 31 May 2017 19:26:34 +0200 Subject: timers: queue up killing ephemerals only if not already Signed-off-by: Jason A. Donenfeld --- src/timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3