int count = 0;
for (const struct aggr_item_node *item = $3; item; item = item->next) {
- log(L_WARN "type %d sacode %d", item->i.type, item->i.sa.sa_code);
-
/*
* If NET attribute is present, aggregate routes within the same net
* and receive updates with any routes.
AGGREGATOR_CFG->aggr_on = cfg_alloc(sizeof(struct aggr_item) * count);
int pos = 0;
+
for (const struct aggr_item_node *item = $3; item; item = item->next) {
if (item->i.type == AGGR_ITEM_DYNAMIC_ATTR)
AGGREGATOR_CFG->aggr_on_da_count++;
struct net_addr addr = { 0 };
net_fill_ipa(&addr, prefix, pxlen);
- struct network *n = allocz(sizeof(*n) + sizeof(struct net_addr));
+ struct network *n = allocz(sizeof(*n) + sizeof(addr));
net_copy(n->n.addr, &addr);
aggregator_bucket_update(p, bucket, n);
ASSERT_DIE(node->original_bucket != NULL);
/* Imaginary node if this was a complete binary tree */
- struct trie_node imaginary_node = {
- .parent = node,
- };
+ struct trie_node imaginary_node = { 0 };
/*
* Imaginary node is used only for computing sets of potential buckets
/* Find the closest IN_FIB ancestor of the updated node */
// TODO: use node ancestor pointer instead of traversing
+ /*
while (1)
{
if ((ancestor->status == IN_FIB && ancestor != updated_node) || !ancestor->parent)
ancestor = ancestor->parent;
}
+ */
- /*
while (ancestor = ancestor->parent)
{
ASSERT_DIE(ancestor != updated_node);
if (ancestor->status == IN_FIB || !ancestor->parent)
break;
}
- */
// TODO: root should never get here
ASSERT_DIE(ancestor != NULL);
ASSERT_DIE(highest_node != NULL);
aggregator_third_pass(p, highest_node);
- check_trie_after_aggregation(p->root);
+ check_trie_after_aggregation(highest_node);
}