summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorMaria Matejka <mq@jmq.cz>2020-02-10 08:41:05 +0100
committerMaria Matejka <mq@ucw.cz>2021-10-13 19:09:04 +0200
commiteb937358c087eaeb6f209660cc7ecfe6d6eff739 (patch)
treeb21a471c3c7247eb226cee5cbc9bf887bae6023a /proto/ospf
parentd5a32563df1653952937117133f09143929ff0c2 (diff)
Preference moved to RTA and set explicitly in protocols
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/ospf.c2
-rw-r--r--proto/ospf/rt.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 48e078ed..4b69e011 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -609,7 +609,7 @@ ospf_get_route_info(rte * rte, byte * buf)
}
buf += bsprintf(buf, " %s", type);
- buf += bsprintf(buf, " (%d/%d", rte->pref, rte->u.ospf.metric1);
+ buf += bsprintf(buf, " (%d/%d", rte->attrs->pref, rte->u.ospf.metric1);
if (rte->attrs->source == RTS_OSPF_EXT2)
buf += bsprintf(buf, "/%d", rte->u.ospf.metric2);
buf += bsprintf(buf, ")");
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index faee49dc..eb2aa393 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -2058,6 +2058,7 @@ again1:
.scope = SCOPE_UNIVERSE,
.dest = RTD_UNICAST,
.nh = *(nf->n.nhs),
+ .pref = p->p.main_channel->preference,
};
if (reload || ort_changed(nf, &a0))