From: Igor Putovny Date: Tue, 4 Mar 2025 14:04:44 +0000 (+0100) Subject: Prune the trie after every aggregation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51328d4774f117bf9af529072fe7bfb6d4340305;p=thirdparty%2Fbird.git Prune the trie after every aggregation --- diff --git a/proto/aggregator/trie.c b/proto/aggregator/trie.c index f1cef7fde..fcaa9d39a 100644 --- a/proto/aggregator/trie.c +++ b/proto/aggregator/trie.c @@ -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); + } } /*