From ee1cec47b370914f19e7eb5188f0abafccc326b9 Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Tue, 13 May 2025 15:21:06 +0200 Subject: [PATCH] [client, android] Do not propagate empty routes (#3805) If we get domain routes the Network prefix variable in route structure will be invalid (engine.go:1057). When we handower to Android the routes, we must to filter out the domain routes. If we do not do it the Android code will get "invalid prefix" string as a route. --- client/internal/routemanager/notifier/notifier.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/internal/routemanager/notifier/notifier.go b/client/internal/routemanager/notifier/notifier.go index ebdd60323..25a3a71e0 100644 --- a/client/internal/routemanager/notifier/notifier.go +++ b/client/internal/routemanager/notifier/notifier.go @@ -32,6 +32,10 @@ func (n *Notifier) SetListener(listener listener.NetworkChangeListener) { func (n *Notifier) SetInitialClientRoutes(clientRoutes []*route.Route) { nets := make([]string, 0) for _, r := range clientRoutes { + // filter out domain routes + if r.IsDynamic() { + continue + } nets = append(nets, r.Network.String()) } sort.Strings(nets)