]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
timers: no need to clear keepalive in persistent keepalive
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 18 May 2018 23:52:17 +0000 (01:52 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sat, 19 May 2018 00:40:22 +0000 (02:40 +0200)
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.

Kernel module commit a24b3e6e15ae1ea1291666e5da910caf43eedbaf

timers.go

index 75087cb275cdf17985918db51e546386f6087f57..ae206cdb72b31bb5c5007baf86862f055d92e118 100644 (file)
--- a/timers.go
+++ b/timers.go
@@ -134,9 +134,6 @@ func expiredZeroKeyMaterial(peer *Peer) {
 
 func expiredPersistentKeepalive(peer *Peer) {
        if peer.persistentKeepaliveInterval > 0 {
-               if peer.timersActive() {
-                       peer.timers.sendKeepalive.Del()
-               }
                peer.SendKeepalive()
        }
 }