summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-05-30 17:11:30 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-30 17:11:30 +0200
commit674587d9c84ed70151abc56003c371668079ae31 (patch)
treecc73d6aad590afb11acf24a79ddd42203abe9661 /nest/rt-table.c
parent5051e3c4afe04aeb59abeaa3370c9e660dfa37f1 (diff)
parentd8661a4397e4576ac404661b192dd99d928e7890 (diff)
Merge commit 'd8661a4397e4576ac404661b192dd99d928e7890' into haugesund
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 849f6766..d89c087d 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -2505,7 +2505,8 @@ rta_apply_hostentry(rta *a, struct hostentry *he, mpls_label_stack *mls)
{
a->hostentry = he;
a->dest = he->dest;
- a->igp_metric = he->igp_metric;
+
+ ea_set_attr_u32(&a->eattrs, &ea_gen_igp_metric, 0, he->igp_metric);
if (a->dest != RTD_UNICAST)
{
@@ -2602,7 +2603,8 @@ rta_next_hop_outdated(rta *a)
if (!he->src)
return a->dest != RTD_UNREACHABLE;
- return (a->dest != he->dest) || (a->igp_metric != he->igp_metric) ||
+ return (a->dest != he->dest) ||
+ (ea_get_int(a->eattrs, &ea_gen_igp_metric, IGP_METRIC_UNKNOWN) != he->igp_metric) ||
(!he->nexthop_linkable) || !nexthop_same(&(a->nh), &(he->src->nh));
}
@@ -3534,7 +3536,7 @@ if_local_addr(ip_addr a, struct iface *i)
}
u32
-rt_get_igp_metric(rte *rt)
+rt_get_igp_metric(const rte *rt)
{
eattr *ea = ea_find(rt->attrs->eattrs, "igp_metric");