NetworkExtension: bump sockets on path change

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2019-05-30 15:31:09 +02:00
parent 714d6a41bd
commit 168ba2da8a
5 changed files with 34 additions and 12 deletions
+9
View File
@@ -165,6 +165,15 @@ func wgGetConfig(tunnelHandle int32) *C.char {
writer.Flush()
return C.CString(settings.String())
}
//export wgBumpSockets
func wgBumpSockets(tunnelHandle int32) {
device, ok := tunnelHandles[tunnelHandle]
if !ok {
return
}
device.BindUpdate()
device.SendKeepalivesToPeersWithCurrentKeypair()
}
//export wgVersion
func wgVersion() *C.char {