From 7dfbb71f7a14bae8ce51e606198032496c6a5417 Mon Sep 17 00:00:00 2001 From: Pascal Fischer Date: Mon, 12 Jun 2023 12:49:21 +0200 Subject: [PATCH] test windows --- client/internal/routemanager/systemops_windows.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/internal/routemanager/systemops_windows.go b/client/internal/routemanager/systemops_windows.go index e91e03052..a6f20c59a 100644 --- a/client/internal/routemanager/systemops_windows.go +++ b/client/internal/routemanager/systemops_windows.go @@ -28,7 +28,8 @@ func existsInRouteTable(prefix netip.Prefix) (bool, error) { for _, route := range routes { ip := net.ParseIP(route.Mask) - mask := net.IPMask(ip) + ip = ip.To4() + mask := net.IPv4Mask(ip[0], ip[1], ip[2], ip[3]) cidr, _ := mask.Size() fmt.Println(route.Destination, "<=>", prefix.Addr().String()) fmt.Println(cidr, "<=>", prefix.Bits())