From b003ffd348186a9d0411e0905ded8cb35a5ed12b Mon Sep 17 00:00:00 2001 From: Igor Putovny Date: Fri, 6 Oct 2023 13:50:05 +0200 Subject: [PATCH] Assign route bucket only to the last inserted node --- proto/aggregator/aggregator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index ad89cc08e..5bd89a65c 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -166,12 +166,13 @@ trie_insert_prefix(const union net_addr_union *addr, struct trie_node * const ro { struct trie_node *new = new_node(trie_slab); new->parent = node; - new->bucket = bucket; node->child[bit] = new; } node = node->child[bit]; } + + node->bucket = bucket; } static struct aggregator_bucket * -- 2.47.2