]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Add small check to the first pass of ORTC algorithm
authorIgor Putovny <igor.putovny@nic.cz>
Tue, 12 Mar 2024 15:33:23 +0000 (16:33 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Thu, 30 May 2024 10:30:00 +0000 (12:30 +0200)
proto/aggregator/aggregator.c

index 1c80e6f2d7bf91690df685f9d4f0aea6b73009c9..a1889588c0c708a5fee1123dd703cb3886334f4a 100644 (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;
   }