mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-26 10:03:47 +01:00
test windows
This commit is contained in:
parent
ce091ab42b
commit
a5d14c92ff
@ -4,6 +4,7 @@
|
|||||||
package routemanager
|
package routemanager
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
|
|
||||||
@ -29,6 +30,8 @@ func existsInRouteTable(prefix netip.Prefix) (bool, error) {
|
|||||||
ip := net.ParseIP(route.Mask)
|
ip := net.ParseIP(route.Mask)
|
||||||
mask := net.IPMask(ip)
|
mask := net.IPMask(ip)
|
||||||
cidr, _ := mask.Size()
|
cidr, _ := mask.Size()
|
||||||
|
fmt.Println(route.Destination, "<=>", prefix.Addr().String())
|
||||||
|
fmt.Println(cidr, "<=>", prefix.Bits())
|
||||||
if route.Destination == prefix.Addr().String() && cidr == prefix.Bits() {
|
if route.Destination == prefix.Addr().String() && cidr == prefix.Bits() {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user