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/babel | |
parent | d5a32563df1653952937117133f09143929ff0c2 (diff) |
Preference moved to RTA and set explicitly in protocols
Diffstat (limited to 'proto/babel')
-rw-r--r-- | proto/babel/babel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/proto/babel/babel.c b/proto/babel/babel.c index 68cc62f1..246eea00 100644 --- a/proto/babel/babel.c +++ b/proto/babel/babel.c @@ -645,6 +645,7 @@ babel_announce_rte(struct babel_proto *p, struct babel_entry *e) .source = RTS_BABEL, .scope = SCOPE_UNIVERSE, .dest = RTD_UNICAST, + .pref = c->preference, .from = r->neigh->addr, .nh.gw = r->next_hop, .nh.iface = r->neigh->ifa->iface, @@ -676,13 +677,13 @@ babel_announce_rte(struct babel_proto *p, struct babel_entry *e) .source = RTS_BABEL, .scope = SCOPE_UNIVERSE, .dest = RTD_UNREACHABLE, + .pref = 1, }; rta *a = rta_lookup(&a0); rte *rte = rte_get_temp(a); memset(&rte->u.babel, 0, sizeof(rte->u.babel)); rte->pflags = 0; - rte->pref = 1; e->unreachable = 1; rte_update2(c, e->n.addr, rte, p->p.main_source); @@ -2010,7 +2011,7 @@ babel_dump(struct proto *P) static void babel_get_route_info(rte *rte, byte *buf) { - buf += bsprintf(buf, " (%d/%d) [%lR]", rte->pref, rte->u.babel.metric, rte->u.babel.router_id); + buf += bsprintf(buf, " (%d/%d) [%lR]", rte->attrs->pref, rte->u.babel.metric, rte->u.babel.router_id); } static int |