summaryrefslogtreecommitdiff
path: root/proto/rpki
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-05-30 12:03:03 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-30 14:39:09 +0200
commit938742decc6e1d6d3a0375dd012b75172e747bbc (patch)
treea10d9eb2811af43075c2c5272ece7b3dbbb38cdf /proto/rpki
parent950775f6fa3d569a9d7cd05e33538d35e895d688 (diff)
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.
Diffstat (limited to 'proto/rpki')
-rw-r--r--proto/rpki/rpki.c10
1 files changed, 4 insertions, 6 deletions
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;