Use event.Route.Link for getting the route metrics

This commit is contained in:
Milos Gajdos 2019-10-23 19:55:01 +01:00
parent b67be88952
commit 71122836b8
No known key found for this signature in database
GPG Key ID: 8B31058CC55DFD4F

View File

@ -859,7 +859,7 @@ func (n *network) advertise(advertChan <-chan *router.Advert) {
address = fmt.Sprintf("%d", hasher.Sum64())
}
// calculate route metric to advertise
metric := n.getRouteMetric(event.Route.Router, event.Route.Gateway, DefaultLink)
metric := n.getRouteMetric(event.Route.Router, event.Route.Gateway, event.Route.Link)
// NOTE: we override Gateway, Link and Address here
route := &pbRtr.Route{
Service: event.Route.Service,