diff options
author | Maria Matejka <mq@ucw.cz> | 2022-07-22 15:48:20 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-07-22 15:48:20 +0200 |
commit | 432dfe3b9b97062be243609d69e0f49bdb0bcaf6 (patch) | |
tree | 03d7e4f75fac6dc0a2ecda2125061b37a285ca97 | |
parent | 4d48ede51dfff9a59572a6b7a21a1bbf159dec60 (diff) |
Fixed a rarely used part of Babel: comparing two routes in table by their metric
-rw-r--r-- | proto/babel/babel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/babel/babel.c b/proto/babel/babel.c index 7ea1aba8..ecfd2763 100644 --- a/proto/babel/babel.c +++ b/proto/babel/babel.c @@ -2338,8 +2338,8 @@ babel_rt_notify(struct proto *P, struct channel *c UNUSED, struct network *net, static int babel_rte_better(struct rte *new, struct rte *old) { - uint new_metric = ea_find(new->attrs->eattrs, EA_BABEL_SEQNO)->u.data; - uint old_metric = ea_find(old->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_get_int(old->attrs->eattrs, EA_BABEL_METRIC, BABEL_INFINITY); return new_metric < old_metric; } |