aboutsummaryrefslogtreecommitdiffstats
path: root/device.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-02-22 19:33:28 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-02-22 19:33:28 +0100
commit6e4460ae6518b2bcdbc3dc5472a407b56772d939 (patch)
tree0eb384dcc1b1b3aebac91564b59edeb873e65f22 /device.go
parentwintun: Read/write packet size from/to exchange buffer directly (diff)
downloadwireguard-go-6e4460ae6518b2bcdbc3dc5472a407b56772d939.tar.xz
wireguard-go-6e4460ae6518b2bcdbc3dc5472a407b56772d939.zip
device: send persistent keepalive when bringing up device
Reported-by: Marcelo Bello
Diffstat (limited to 'device.go')
-rw-r--r--device.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/device.go b/device.go
index 2538648..18e1138 100644
--- 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()