mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
Merge branch 'backport' into thread-next
This commit is contained in:
commit
95d970d7a0
@ -1121,24 +1121,18 @@ rip_rte_proto(struct rte *rte)
|
||||
SKIP_BACK(struct rip_proto, p.sources, rte->src->owner) : NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
rip_rte_better(struct rte *new, struct rte *old)
|
||||
{
|
||||
ASSERT_DIE(new->src == old->src);
|
||||
struct rip_proto *p = rip_rte_proto(new);
|
||||
|
||||
u32 new_metric = ea_get_int(new->attrs, &ea_rip_metric, p->infinity);
|
||||
u32 old_metric = ea_get_int(old->attrs, &ea_rip_metric, p->infinity);
|
||||
|
||||
return new_metric < old_metric;
|
||||
}
|
||||
|
||||
static u32
|
||||
rip_rte_igp_metric(const rte *rt)
|
||||
{
|
||||
return ea_get_int(rt->attrs, &ea_rip_metric, IGP_METRIC_UNKNOWN);
|
||||
}
|
||||
|
||||
static int
|
||||
rip_rte_better(struct rte *new, struct rte *old)
|
||||
{
|
||||
return rip_rte_igp_metric(new) < rip_rte_igp_metric(old);
|
||||
}
|
||||
|
||||
static void
|
||||
rip_postconfig(struct proto_config *CF)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user