diff options
author | Maria Matejka <mq@jmq.cz> | 2020-02-10 08:41:05 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-10-13 19:09:04 +0200 |
commit | eb937358c087eaeb6f209660cc7ecfe6d6eff739 (patch) | |
tree | b21a471c3c7247eb226cee5cbc9bf887bae6023a /proto/static | |
parent | d5a32563df1653952937117133f09143929ff0c2 (diff) |
Preference moved to RTA and set explicitly in protocols
Diffstat (limited to 'proto/static')
-rw-r--r-- | proto/static/static.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/proto/static/static.c b/proto/static/static.c index 2789c1bb..2d141c07 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -60,6 +60,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; if (r->dest == RTD_UNICAST) { @@ -721,9 +722,9 @@ static_get_route_info(rte *rte, byte *buf) { eattr *a = ea_find(rte->attrs->eattrs, EA_GEN_IGP_METRIC); if (a) - buf += bsprintf(buf, " (%d/%u)", rte->pref, a->u.data); + buf += bsprintf(buf, " (%d/%u)", rte->attrs->pref, a->u.data); else - buf += bsprintf(buf, " (%d)", rte->pref); + buf += bsprintf(buf, " (%d)", rte->attrs->pref); } static void |