extern linpool *rte_update_pool;
-static void aggregator_bucket_update(struct aggregator_proto *p, struct aggregator_bucket *bucket, struct network *net);
-
static inline int
is_leaf(const struct trie_node *node)
{
/*
* Mark appropriate child of parent node as NULL
*/
-static void
+static inline void
remove_node(struct trie_node *node)
{
assert(node != NULL);
}
}
+static void aggregator_bucket_update(struct aggregator_proto *p, struct aggregator_bucket *bucket, struct network *net);
+
/*
* Create route for aggregated prefix
*/
rta->source = RTS_AGGREGATED;
rta->scope = SCOPE_UNIVERSE;
- struct ea_list *eal = allocz(sizeof(struct ea_list) + sizeof(struct eattr) * p->aggr_on_da_count);
+ struct ea_list *eal = allocz(sizeof(*eal) + sizeof(struct eattr) * p->aggr_on_da_count);
eal->next = NULL;
eal->count = 0;
rta->eattrs = eal;
{
struct aggregator_proto *p = SKIP_BACK(struct aggregator_proto, p, P);
+ assert(p->bucket_pool == NULL);
+ assert(p->route_pool == NULL);
+ assert(p->trie_pool == NULL);
+
p->addr_type = p->src->table->addr_type;
p->bucket_pool = lp_new(P->pool);
if (PREFIX_AGGR == p->aggr_mode)
{
+ assert(p->trie_pool == NULL);
p->trie_pool = lp_new(P->pool);
settle_init(&p->notify_settle, &p->notify_settle_cf, request_feed_on_settle_timer, p);
}