From 51328d4774f117bf9af529072fe7bfb6d4340305 Mon Sep 17 00:00:00 2001 From: Igor Putovny Date: Tue, 4 Mar 2025 15:04:44 +0100 Subject: [PATCH] Prune the trie after every aggregation --- proto/aggregator/trie.c | 4 ++++ 1 file changed, 4 insertions(+) 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); + } } /* -- 2.47.2