From: Igor Putovny Date: Tue, 12 Mar 2024 15:33:23 +0000 (+0100) Subject: Add small check to the first pass of ORTC algorithm X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09a013fbad19575b22709c872b88a18634ca624a;p=thirdparty%2Fbird.git Add small check to the first pass of ORTC algorithm --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 1c80e6f2d..a1889588c 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -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; }