mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
fix route deletion
This commit is contained in:
@@ -228,8 +228,6 @@ func (e *Engine) Start() error {
|
||||
})
|
||||
case "ios":
|
||||
err = e.wgInterface.CreateOniOS(e.mobileDep.FileDescriptor)
|
||||
log.Debugf("sending initial route range %s to iOS", strings.Join(e.routeManager.InitialRouteRange(), ","))
|
||||
e.mobileDep.RouteListener.OnNewRouteSetting(strings.Join(e.routeManager.InitialRouteRange(), ","))
|
||||
default:
|
||||
err = e.wgInterface.Create()
|
||||
}
|
||||
|
||||
@@ -53,8 +53,7 @@ func NewManager(ctx context.Context, pubKey string, wgInterface *iface.WGIface,
|
||||
notifier: newNotifier(),
|
||||
}
|
||||
|
||||
log.Debug("initializing route manager")
|
||||
if runtime.GOOS == "android" || runtime.GOOS == "ios" {
|
||||
if runtime.GOOS == "android" {
|
||||
cr := dm.clientRoutes(initialRoutes)
|
||||
dm.notifier.setInitialClientRoutes(cr)
|
||||
}
|
||||
|
||||
@@ -59,9 +59,6 @@ func (n *notifier) onNewRoutes(idMap map[string][]*route.Route) {
|
||||
|
||||
n.routeRangers = newNets
|
||||
|
||||
if !n.hasDiff(n.initialRouteRangers, newNets) {
|
||||
return
|
||||
}
|
||||
n.notify()
|
||||
}
|
||||
|
||||
|
||||
15
client/internal/routemanager/systemops_ios.go
Normal file
15
client/internal/routemanager/systemops_ios.go
Normal file
@@ -0,0 +1,15 @@
|
||||
//go:build ios
|
||||
|
||||
package routemanager
|
||||
|
||||
import (
|
||||
"net/netip"
|
||||
)
|
||||
|
||||
func addToRouteTableIfNoExists(prefix netip.Prefix, addr string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func removeFromRouteTableIfNonSystem(prefix netip.Prefix, addr string) error {
|
||||
return nil
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !android
|
||||
//go:build !android && !ios
|
||||
|
||||
package routemanager
|
||||
|
||||
|
||||
Reference in New Issue
Block a user