]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Small changes
authorIgor Putovny <igor.putovny@nic.cz>
Tue, 11 Feb 2025 13:02:09 +0000 (14:02 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Tue, 11 Feb 2025 13:02:09 +0000 (14:02 +0100)
proto/aggregator/aggregator.c

index 1a0097d65ed21dac9325f62a5dc6ba8a5a144809..58b34ccab154e108042eb80790a0e61dc1592150 100644 (file)
@@ -769,22 +769,21 @@ third_pass_helper(struct aggregator_proto *p, struct trie_node *node, struct net
     assert(node->selected_bucket != NULL);
 
     /*
-     * Prefix status is changing from NON_FIB to IN_FIB, thus its route
-     * must be exported to the routing table.
+     * Prefix status is changing from NON_FIB or UNASSIGNED (at newly created nodes)
+     * to IN_FIB, thus its route is exported to the routing table.
      */
-    if (NON_FIB == node->status || UNASSIGNED_STATUS == node->status)
+    if (IN_FIB != node->status)
     {
       log("Exporting %s route for %N", px_origin_str[node->px_origin], addr);
       create_route_ip4(p, addr, node->selected_bucket);
     }
 
-    node->status = IN_FIB;
-
     /*
      * Keep information whether this prefix was original. If not, then its origin
      * is changed to aggregated, because it's going to FIB.
      */
     node->px_origin = ORIGINAL == node->px_origin ? ORIGINAL : AGGREGATED;
+    node->status = IN_FIB;
   }
 
   assert((node->selected_bucket != NULL && node->status == IN_FIB) || (node->selected_bucket == NULL && node->status == NON_FIB));