aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel/winipcfg/route_change_handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'tunnel/winipcfg/route_change_handler.go')
-rw-r--r--tunnel/winipcfg/route_change_handler.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tunnel/winipcfg/route_change_handler.go b/tunnel/winipcfg/route_change_handler.go
index 4bdea672..cafa0e97 100644
--- a/tunnel/winipcfg/route_change_handler.go
+++ b/tunnel/winipcfg/route_change_handler.go
@@ -71,9 +71,10 @@ func (callback *RouteChangeCallback) Unregister() error {
}
func routeChanged(callerContext uintptr, row *MibIPforwardRow2, notificationType MibNotificationType) uintptr {
+ rowCopy := *row
routeChangeMutex.Lock()
for cb := range routeChangeCallbacks {
- go cb.cb(notificationType, row)
+ go cb.cb(notificationType, &rowCopy)
}
routeChangeMutex.Unlock()
return 0