]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Assign bucket of ancestor node to leaf node
authorIgor Putovny <igor.putovny@nic.cz>
Fri, 6 Oct 2023 12:38:07 +0000 (14:38 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Fri, 6 Oct 2023 12:38:07 +0000 (14:38 +0200)
proto/aggregator/aggregator.c

index d8f1685154dca934e35cf1de45f879efeea9cb29..aeca201929181f0c3864ed8c832ebc478f1e5bd5 100644 (file)
@@ -182,7 +182,7 @@ get_ancestor_bucket(const struct trie_node *node)
   while (1)
   {
     if (node->parent == NULL)
-      return NULL;
+      return node->bucket;
 
     if (node->parent->bucket != NULL)
       return node->parent->bucket;
@@ -204,6 +204,7 @@ first_pass(struct trie_node *node, slab *trie_slab)
   if (is_leaf(node))
   {
     node->potential_buckets[node->potential_buckets_count++] = get_ancestor_bucket(node);
+    //node->potential_buckets[node->potential_buckets_count++] = node->bucket;
     return;
   }