summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-08 15:31:28 +0200
committerMaria Matejka <mq@ucw.cz>2022-06-08 15:31:28 +0200
commit4364ee9b6f3764c971ab111bf7dc87477fd7272c (patch)
tree7659db681e5df6bee24eb580d02ab286d5855ee5 /sysdep/unix
parentcae5979871ee7aa341334f8b1af6bafc60ee9692 (diff)
parent938742decc6e1d6d3a0375dd012b75172e747bbc (diff)
Merge commit '938742decc6e1d6d3a0375dd012b75172e747bbc' into haugesund
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/krt.c14
-rw-r--r--sysdep/unix/main.c2
2 files changed, 7 insertions, 9 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index 6e55d8f5..a37d3186 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -286,7 +286,7 @@ static struct tbf rl_alien = TBF_DEFAULT_LOG_LIMITS;
static inline u32
krt_metric(rte *a)
{
- eattr *ea = ea_find(a->attrs->eattrs, &ea_krt_metric);
+ eattr *ea = ea_find(a->attrs, &ea_krt_metric);
return ea ? ea->u.data : 0;
}
@@ -306,7 +306,7 @@ static void
krt_learn_announce_update(struct krt_proto *p, rte *e)
{
rte e0 = {
- .attrs = rta_clone(e->attrs),
+ .attrs = ea_clone(e->attrs),
.src = p->p.main_source,
};
@@ -438,9 +438,7 @@ krt_learn_async(struct krt_proto *p, rte *e, int new)
net *n = net_get(p->krt_table, e->net);
struct rte_storage *g, **gg, *best, **bestp, *old_best;
- ASSERT(!e->attrs->cached);
- ea_set_attr_u32(&e->attrs->eattrs, &ea_gen_preference, 0, p->p.main_channel->preference);
-
+ ea_set_attr_u32(&e->attrs, &ea_gen_preference, 0, p->p.main_channel->preference);
struct rte_storage *ee = rte_store(e, n, p->krt_table);
old_best = n->routes;
@@ -616,10 +614,10 @@ reject:
static int
krt_same_dest(rte *k, rte *e)
{
- rta *ka = k->attrs, *ea = e->attrs;
+ ea_list *ka = k->attrs, *ea = e->attrs;
- eattr *nhea_k = ea_find(ka->eattrs, &ea_gen_nexthop);
- eattr *nhea_e = ea_find(ea->eattrs, &ea_gen_nexthop);
+ eattr *nhea_k = ea_find(ka, &ea_gen_nexthop);
+ eattr *nhea_e = ea_find(ea, &ea_gen_nexthop);
return (!nhea_k == !nhea_e) && adata_same(nhea_k->u.ptr, nhea_e->u.ptr);
}
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c
index 8fdad4e6..fd4934d9 100644
--- a/sysdep/unix/main.c
+++ b/sysdep/unix/main.c
@@ -56,7 +56,7 @@ async_dump(void)
// XXXX tm_dump_all();
if_dump_all();
neigh_dump_all();
- rta_dump_all();
+ ea_dump_all();
rt_dump_all();
protos_dump_all();