This commit is contained in:
Viktor Liu
2025-06-02 19:43:07 +02:00
parent a29b28390b
commit ef5027ab2a
2 changed files with 8 additions and 3 deletions

View File

@@ -133,6 +133,12 @@ func (r *Router) CleanUp() {
r.statusRecorder.CleanLocalPeerStateRoutes()
}
func (r *Router) RoutesCount() int {
r.mux.Lock()
defer r.mux.Unlock()
return len(r.routes)
}
func routeToRouterPair(route *route.Route, useNewDNSRoute bool) firewall.RouterPair {
source := getDefaultPrefix(route.Network)
destination := firewall.Network{}