summaryrefslogtreecommitdiff
path: root/proto/rpki/rpki.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/rpki/rpki.c')
-rw-r--r--proto/rpki/rpki.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c
index 4ccb38e3..4fca9e54 100644
--- a/proto/rpki/rpki.c
+++ b/proto/rpki/rpki.c
@@ -121,18 +121,18 @@ rpki_table_add_roa(struct rpki_cache *cache, struct channel *channel, const net_
struct rpki_proto *p = cache->p;
rta a0 = {
- .src = p->p.main_source,
+ .pref = channel->preference,
.source = RTS_RPKI,
.scope = SCOPE_UNIVERSE,
.dest = RTD_NONE,
};
rta *a = rta_lookup(&a0);
- rte *e = rte_get_temp(a);
+ rte *e = rte_get_temp(a, p->p.main_source);
e->pflags = 0;
- rte_update2(channel, &pfxr->n, e, a0.src);
+ rte_update2(channel, &pfxr->n, e, e->src);
}
void
@@ -960,3 +960,9 @@ struct protocol proto_rpki = {
.reconfigure = rpki_reconfigure,
.get_status = rpki_get_status,
};
+
+void
+rpki_build(void)
+{
+ proto_build(&proto_rpki);
+}