]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Bugfix
authorIgor Putovny <igor.putovny@nic.cz>
Mon, 24 Feb 2025 16:18:28 +0000 (17:18 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Mon, 24 Feb 2025 16:18:28 +0000 (17:18 +0100)
Assign px_origin of target node in the third pass

proto/aggregator/trie.c

index 879c6cb5b97b530278dead7b3bd0783f3041ea24..af4599cc2715c27d87711d56b179867b771aa076 100644 (file)
@@ -797,6 +797,8 @@ aggregator_third_pass(struct aggregator_proto *p, struct trie_node *node)
    */
   aggregator_find_subtree_prefix(node, &prefix, &pxlen, p->addr_type);
 
+  ASSERT_DIE(node->selected_bucket == NULL);
+
   /* Select bucket with the lowest ID */
   node->selected_bucket = aggregator_select_lowest_id_bucket(p, node);
   ASSERT_DIE(node->selected_bucket != NULL);
@@ -811,6 +813,7 @@ aggregator_third_pass(struct aggregator_proto *p, struct trie_node *node)
   /* The closest ancestor of the IN_FIB node with a non-null bucket is the node itself */
   node->ancestor = node;
   node->status = IN_FIB;
+  node->px_origin = (node->px_origin == ORIGINAL) ? ORIGINAL : AGGREGATED;
 
   if (node->child[0])
   {