struct net_addr addr = { 0 };
net_fill_ipa(&addr, prefix, pxlen);
- struct rte_withdrawal *node = lp_allocz(p->rte_withdrawal_pool, sizeof(*node));
+ struct rte_withdrawal_item *node = lp_allocz(p->rte_withdrawal_pool, sizeof(*node));
- *node = (struct rte_withdrawal) {
+ *node = (struct rte_withdrawal_item) {
.next = p->rte_withdrawal_stack,
.bucket = bucket,
};
log(L_WARN "This number of updates was not expected."
"They will be processed, but please, contact the developers.");
- struct rte_withdrawal *node = p->rte_withdrawal_stack;
+ struct rte_withdrawal_item *node = NULL;
- while (node)
+ while (node = p->rte_withdrawal_stack)
{
- assert(node != NULL);
rte_update2(p->dst, &node->addr, NULL, node->bucket->last_src);
- node = node->next;
- p->rte_withdrawal_stack = node;
+ p->rte_withdrawal_stack = node->next;
p->rte_withdrawal_count--;
}
struct f_val aggr_data[0];
};
-struct rte_withdrawal {
- struct rte_withdrawal *next;
+/* Structure containing information needed for route withdrawal */
+struct rte_withdrawal_item {
+ struct rte_withdrawal_item *next;
struct aggregator_bucket *bucket;
struct net_addr addr;
};
struct hmap bucket_id_map;
linpool *rte_withdrawal_pool;
- struct rte_withdrawal *rte_withdrawal_stack;
+ struct rte_withdrawal_item *rte_withdrawal_stack;
int rte_withdrawal_count;
};