diff options
Diffstat (limited to 'sysdep/unix/krt.c')
-rw-r--r-- | sysdep/unix/krt.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 84457d37..4539feee 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, }; @@ -322,8 +322,7 @@ krt_learn_announce_delete(struct krt_proto *p, net_addr *n) static struct rte_storage * krt_store_async(struct krt_proto *p, net *n, rte *e) { - 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); e->src = p->p.main_source; return rte_store(e, n, p->krt_table); } @@ -620,10 +619,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); } |