Change router.Route metric to int64. Set the route metric properly

This commit is contained in:
Milos Gajdos
2019-10-23 12:53:36 +01:00
parent 326156671d
commit 1ff65e140a
8 changed files with 67 additions and 33 deletions

View File

@@ -8,9 +8,7 @@ var (
// DefaultLink is default network link
DefaultLink = "local"
// DefaultLocalMetric is default route cost for a local route
DefaultLocalMetric = 1
// DefaultNetworkMetric is default route cost for a network route
DefaultNetworkMetric = 10
DefaultLocalMetric int64 = 1
)
// Route is network route
@@ -28,7 +26,7 @@ type Route struct {
// Link is network link
Link string
// Metric is the route cost metric
Metric int
Metric int64
}
// Hash returns route hash sum.