]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Prune the trie after every aggregation
authorIgor Putovny <igor.putovny@nic.cz>
Tue, 4 Mar 2025 14:04:44 +0000 (15:04 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Tue, 4 Mar 2025 14:04:44 +0000 (15:04 +0100)
proto/aggregator/trie.c

index f1cef7fde8536f787320ad7800c5d42736437b1e..fcaa9d39aa3d844075fd58f6f3552fb5ca0c8670 100644 (file)
@@ -744,8 +744,12 @@ aggregator_third_pass_helper(struct aggregator_proto *p, struct trie_node *node,
     ipa_clrbit(prefix, node->depth + ipa_shift[p->addr_type]);
   }
 
+  /* Prune the trie */
   if (node->status == NON_FIB && aggregator_is_leaf(node))
+  {
     ASSERT_DIE(node->selected_bucket == NULL);
+    aggregator_remove_node(node);
+  }
 }
 
 /*