summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/ospf.c4
-rw-r--r--proto/ospf/rt.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 48e078ed..03b16350 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -490,7 +490,7 @@ ospf_preexport(struct proto *P, rte *e)
struct ospf_area *oa = ospf_main_area(p);
/* Reject our own routes */
- if (e->attrs->src->proto == P)
+ if (e->src->proto == P)
return -1;
/* Do not export routes to stub areas */
@@ -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..cda464e0 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -2053,17 +2053,17 @@ again1:
if (nf->n.type) /* Add the route */
{
rta a0 = {
- .src = p->p.main_source,
.source = nf->n.type,
.scope = SCOPE_UNIVERSE,
.dest = RTD_UNICAST,
.nh = *(nf->n.nhs),
+ .pref = p->p.main_channel->preference,
};
if (reload || ort_changed(nf, &a0))
{
rta *a = rta_lookup(&a0);
- rte *e = rte_get_temp(a);
+ rte *e = rte_get_temp(a, p->p.main_source);
rta_free(nf->old_rta);
nf->old_rta = rta_clone(a);