diff --git a/route/network.go b/route/network.go index 07de8145..1ee735cc 100644 --- a/route/network.go +++ b/route/network.go @@ -291,7 +291,7 @@ func (r *NetworkManager) InterfaceFinder() control.InterfaceFinder { } func (r *NetworkManager) UpdateInterfaces() error { - defer r.updateNetworkEnvironment() + defer r.postUpdateNetworkEnvironment() if r.platformInterface == nil || !r.platformInterface.UsePlatformNetworkInterfaces() { return r.interfaceFinder.Update() } else { diff --git a/route/network_environment_darwin.go b/route/network_environment_darwin.go index 92633878..ad84d3a2 100644 --- a/route/network_environment_darwin.go +++ b/route/network_environment_darwin.go @@ -10,7 +10,7 @@ import ( ) func systemGateways(interfaceIndex int) []netip.Addr { - rib, err := route.FetchRIB(unix.AF_UNSPEC, route.RIBTypeRoute, 0) + rib, err := route.FetchRIB(unix.AF_UNSPEC, route.RIBType(unix.NET_RT_FLAGS), unix.RTF_GATEWAY) if err != nil { return nil }