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