0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 12:48:43 +00:00

Add small check to the first pass of ORTC algorithm

This commit is contained in:
Igor Putovny 2024-03-12 16:33:23 +01:00
parent 24cf9cbf43
commit 09a013fbad

View File

@ -236,6 +236,12 @@ first_pass(struct trie_node *node, slab *trie_slab)
if (is_leaf(node))
{
for (int i = 0; i < node->potential_buckets_count; i++)
{
if (node->potential_buckets[i] == node->bucket)
return;
}
node->potential_buckets[node->potential_buckets_count++] = node->bucket;
return;
}