From: Igor Putovny Date: Tue, 4 Jun 2024 10:25:54 +0000 (+0200) Subject: Run aggregation only once (temporary solution) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eb9175a09575c819704b85bd2ef19c9b821bc0d;p=thirdparty%2Fbird.git Run aggregation only once (temporary solution) --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 5e0024267..ff7c4d7f3 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -919,7 +919,14 @@ static void aggregate_on_settle_timer(struct settle *s) { struct aggregator_proto *p = SKIP_BACK(struct aggregator_proto, p, s->tm.data); - run_aggregation(p); + + if (!p->aggr_done) + { + run_aggregation(p); + p->aggr_done = 1; + } + else + log("Aggregation is already finished"); } /* @@ -1563,6 +1570,7 @@ aggregator_start(struct proto *P) p->trie_slab = sl_new(p->p.pool, sizeof(struct trie_node)); p->root = create_new_node(p->trie_slab); p->root->depth = 1; + p->aggr_done = 0; struct network *default_net = NULL; diff --git a/proto/aggregator/aggregator.h b/proto/aggregator/aggregator.h index 26a18c799..03882665f 100644 --- a/proto/aggregator/aggregator.h +++ b/proto/aggregator/aggregator.h @@ -76,6 +76,7 @@ struct aggregator_proto { struct settle aggr_timer; int before_count; int after_count; + int aggr_done; }; enum aggr_item_type {