]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Run aggregation only once (temporary solution)
authorIgor Putovny <igor.putovny@nic.cz>
Tue, 4 Jun 2024 10:25:54 +0000 (12:25 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Tue, 4 Jun 2024 10:25:54 +0000 (12:25 +0200)
proto/aggregator/aggregator.c
proto/aggregator/aggregator.h

index 5e0024267b1e9c77b4ffb0d3bc17b0a1f07d139c..ff7c4d7f334bfa3d4591f4ded7118fa6fe01acea 100644 (file)
@@ -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;
 
index 26a18c7996fa5ec1200299052fe3822c5cf8eeb0..03882665f6a3901576933e15908cfe2d85f37e61 100644 (file)
@@ -76,6 +76,7 @@ struct aggregator_proto {
   struct settle aggr_timer;
   int before_count;
   int after_count;
+  int aggr_done;
 };
 
 enum aggr_item_type {