0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

Fix incorrect implementation of the third pass

This commit is contained in:
Igor Putovny 2023-10-06 14:19:04 +02:00
parent 2d2354f54e
commit 7213cc08f3

View File

@ -470,6 +470,7 @@ third_pass(struct trie_node *node)
{
assert(node->potential_buckets_count > 0);
node->bucket = node->potential_buckets[0];
goto descent;
}
const struct aggregator_bucket *inherited_bucket = get_ancestor_bucket(node);
@ -490,8 +491,9 @@ third_pass(struct trie_node *node)
}
/* Postorder traversal */
third_pass(node->child[0]);
third_pass(node->child[1]);
descent:
third_pass(node->child[0]);
third_pass(node->child[1]);
/* Leaves with no assigned bucket are removed */
if (node->bucket == NULL && is_leaf(node))