test windows

This commit is contained in:
Pascal Fischer 2023-06-12 12:49:21 +02:00
parent a5d14c92ff
commit 7dfbb71f7a

View File

@ -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())