]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Assign route bucket only to the last inserted node
authorIgor Putovny <igor.putovny@nic.cz>
Fri, 6 Oct 2023 11:50:05 +0000 (13:50 +0200)
committerIgor Putovny <igor.putovny@nic.cz>
Thu, 30 May 2024 10:30:00 +0000 (12:30 +0200)
proto/aggregator/aggregator.c

index ad89cc08e120a3ebfc3dc854a13092935f9bf8c1..5bd89a65ce5eec9465c7ceeb2b3073733668f91e 100644 (file)
@@ -166,12 +166,13 @@ trie_insert_prefix(const union net_addr_union *addr, struct trie_node * const ro
     {
       struct trie_node *new = new_node(trie_slab);
       new->parent = node;
-      new->bucket = bucket;
       node->child[bit] = new;
     }
 
     node = node->child[bit];
   }
+
+  node->bucket = bucket;
 }
 
 static struct aggregator_bucket *