mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-17 16:48:43 +00:00
Fixed a rarely used part of Babel: comparing two routes in table by their metric
This commit is contained in:
parent
4d48ede51d
commit
432dfe3b9b
@ -2338,8 +2338,8 @@ babel_rt_notify(struct proto *P, struct channel *c UNUSED, struct network *net,
|
|||||||
static int
|
static int
|
||||||
babel_rte_better(struct rte *new, struct rte *old)
|
babel_rte_better(struct rte *new, struct rte *old)
|
||||||
{
|
{
|
||||||
uint new_metric = ea_find(new->attrs->eattrs, EA_BABEL_SEQNO)->u.data;
|
uint new_metric = ea_get_int(new->attrs->eattrs, EA_BABEL_METRIC, BABEL_INFINITY);
|
||||||
uint old_metric = ea_find(old->attrs->eattrs, EA_BABEL_SEQNO)->u.data;
|
uint old_metric = ea_get_int(old->attrs->eattrs, EA_BABEL_METRIC, BABEL_INFINITY);
|
||||||
|
|
||||||
return new_metric < old_metric;
|
return new_metric < old_metric;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user