From 938742decc6e1d6d3a0375dd012b75172e747bbc Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Mon, 30 May 2022 12:03:03 +0200 Subject: Squashing the route attribute structure into one level. For now, all route attributes are stored as eattrs in ea_list. This should make route manipulation easier and it also allows for a layered approach of route attributes where updates from filters will be stored as an overlay over the previous version. --- proto/rpki/rpki.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'proto/rpki/rpki.c') diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c index 4318cbb7..2d36f1fb 100644 --- a/proto/rpki/rpki.c +++ b/proto/rpki/rpki.c @@ -120,13 +120,11 @@ rpki_table_add_roa(struct rpki_cache *cache, struct channel *channel, const net_ { struct rpki_proto *p = cache->p; - rta a0 = {}; + ea_list *ea = NULL; + ea_set_attr_u32(&ea, &ea_gen_preference, 0, channel->preference); + ea_set_attr_u32(&ea, &ea_gen_source, 0, RTS_RPKI); - ea_set_attr_u32(&a0.eattrs, &ea_gen_preference, 0, channel->preference); - ea_set_attr_u32(&a0.eattrs, &ea_gen_source, 0, RTS_RPKI); - - rta *a = rta_lookup(&a0); - rte *e = rte_get_temp(a, p->p.main_source); + rte *e = rte_get_temp(rta_lookup(ea), p->p.main_source); e->pflags = 0; -- cgit v1.2.3