0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Babel: Fix type of route entry router ID

The router ID being assigned to routes was a uint, which discards the
upper 32 bits. This also has the nice side effect of echoing the wrong
router ID back to other routers.

Thanks to Toke Hoiland-Jorgensen for the patch.
This commit is contained in:
Ondrej Zajicek (work) 2018-05-03 16:02:29 +02:00
parent 29958745c8
commit 23b079043b

View File

@ -2133,7 +2133,7 @@ babel_rt_notify(struct proto *P, struct channel *c UNUSED, struct network *net,
uint internal = (new->attrs->src->proto == P); uint internal = (new->attrs->src->proto == P);
uint rt_seqno = internal ? new->u.babel.seqno : p->update_seqno; uint rt_seqno = internal ? new->u.babel.seqno : p->update_seqno;
uint rt_metric = ea_get_int(attrs, EA_BABEL_METRIC, 0); uint rt_metric = ea_get_int(attrs, EA_BABEL_METRIC, 0);
uint rt_router_id = internal ? new->u.babel.router_id : p->router_id; u64 rt_router_id = internal ? new->u.babel.router_id : p->router_id;
if (rt_metric > BABEL_INFINITY) if (rt_metric > BABEL_INFINITY)
{ {