device: send persistent keepalive when bringing up device

Reported-by: Marcelo Bello
This commit is contained in:
Jason A. Donenfeld 2019-02-22 19:33:28 +01:00
parent d002eff155
commit 6e4460ae65

View file

@ -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()