From d8661a4397e4576ac404661b192dd99d928e7890 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 20 Apr 2022 10:25:14 +0200 Subject: Joined the RTA igp_metric and EA igp_metric attributes --- nest/rt-table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nest/rt-table.c') diff --git a/nest/rt-table.c b/nest/rt-table.c index af59d63b..01194e02 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -2386,7 +2386,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) { @@ -2483,7 +2484,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)); } -- cgit v1.2.3