]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
device: send persistent keepalive when bringing up device
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 22 Feb 2019 18:33:28 +0000 (19:33 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 22 Feb 2019 18:33:28 +0000 (19:33 +0100)
Reported-by: Marcelo Bello
device.go

index 25386481a7dbaceb09f2d007d0349b5bc80aaf57..18e1138cd01c3ff41edb4201d96b5fa3a85ece65 100644 (file)
--- a/device.go
+++ b/device.go
@@ -138,6 +138,9 @@ func deviceUpdateState(device *Device) {
                device.peers.RLock()
                for _, peer := range device.peers.keyMap {
                        peer.Start()
+                       if peer.persistentKeepaliveInterval > 0 {
+                               peer.SendKeepalive()
+                       }
                }
                device.peers.RUnlock()