summaryrefslogtreecommitdiff
path: root/proto/static
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-05-30 17:18:03 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-30 17:18:03 +0200
commit1a92ee9d4df265018c0344064019f53bc3afce3a (patch)
tree3eb67d0604086b399618bc525a83ce83deac9eb0 /proto/static
parent674587d9c84ed70151abc56003c371668079ae31 (diff)
parent337c04c45e1472d6d9b531a3c55f1f2d30ebf308 (diff)
Merge commit '337c04c45e1472d6d9b531a3c55f1f2d30ebf308' into haugesund
Diffstat (limited to 'proto/static')
-rw-r--r--proto/static/static.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/proto/static/static.c b/proto/static/static.c
index 2fc8e788..9b6c38ee 100644
--- a/proto/static/static.c
+++ b/proto/static/static.c
@@ -58,7 +58,7 @@ static_announce_rte(struct static_proto *p, struct static_route *r)
a->source = RTS_STATIC;
a->scope = SCOPE_UNIVERSE;
a->dest = r->dest;
- a->pref = p->p.main_channel->preference;
+ ea_set_attr_u32(&a->eattrs, &ea_gen_preference, 0, p->p.main_channel->preference);
if (r->dest == RTD_UNICAST)
{
@@ -695,10 +695,11 @@ static void
static_get_route_info(rte *rte, byte *buf)
{
eattr *a = ea_find(rte->attrs->eattrs, &ea_gen_igp_metric);
+ u32 pref = rt_get_preference(rte);
if (a)
- buf += bsprintf(buf, " (%d/%u)", rte->attrs->pref, a->u.data);
+ buf += bsprintf(buf, " (%d/%u)", pref, a->u.data);
else
- buf += bsprintf(buf, " (%d)", rte->attrs->pref);
+ buf += bsprintf(buf, " (%d)", pref);
}
static void