diff options
author | Maria Matejka <mq@ucw.cz> | 2022-04-20 10:25:14 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-04 15:39:21 +0200 |
commit | d8661a4397e4576ac404661b192dd99d928e7890 (patch) | |
tree | e158c76950fc1909c3a6d97f7eec44aecab03278 /nest | |
parent | 17f91f9e6e70f7e3f29502e854823c0d48571eaa (diff) |
Joined the RTA igp_metric and EA igp_metric attributes
Diffstat (limited to 'nest')
-rw-r--r-- | nest/rt-attr.c | 2 | ||||
-rw-r--r-- | nest/rt-table.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c index a763db4d..6bb27623 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -1225,7 +1225,6 @@ rta_hash(rta *a) #define BMIX(f) mem_hash_mix_num(&h, a->f); MIX(hostentry); MIX(from); - MIX(igp_metric); BMIX(source); BMIX(scope); BMIX(dest); @@ -1241,7 +1240,6 @@ rta_same(rta *x, rta *y) return (x->source == y->source && x->scope == y->scope && x->dest == y->dest && - x->igp_metric == y->igp_metric && ipa_equal(x->from, y->from) && x->hostentry == y->hostentry && nexthop_same(&(x->nh), &(y->nh)) && 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)); } |