]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Leaves don't have to be IN_FIB since we are not removing NON_FIB leaves anymore
authorIgor Putovny <igor.putovny@nic.cz>
Wed, 11 Dec 2024 14:14:42 +0000 (15:14 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Wed, 11 Dec 2024 14:16:26 +0000 (15:16 +0100)
proto/aggregator/aggregator.c

index 08c38dc458bb21f612dd3a7f3c1fa9598d4b5728..dedb22d9c07aae8e10edc53f5ed91a2952d5cc9e 100644 (file)
@@ -682,13 +682,6 @@ check_ancestors_after_aggregation(const struct trie_node *node)
   assert(node != NULL);
   assert(node->ancestor != NULL);
 
-  if (is_leaf(node))
-  {
-    assert(node->selected_bucket != NULL && node->status == IN_FIB);
-    assert(node->ancestor == node);
-    return;
-  }
-
   if (IN_FIB == node->status)
   {
     assert(node->selected_bucket != NULL);
@@ -1125,13 +1118,9 @@ collect_prefixes_ip4_helper(struct aggregator_proto *p, struct net_addr_ip4 *add
 
   if (is_leaf(node))
   {
-    assert(node->original_bucket != NULL);
-    assert(node->selected_bucket != NULL);
-    assert(IN_FIB == node->status);
+    if (IN_FIB == node->status)
+      p->leaves++;
 
-    create_route_ip4(p, node->selected_bucket, addr);
-    *count += 1;
-    p->leaves++;
     return;
   }
 
@@ -1170,13 +1159,9 @@ collect_prefixes_ip6_helper(struct aggregator_proto *p, struct net_addr_ip6 *add
 
   if (is_leaf(node))
   {
-    assert(node->original_bucket != NULL);
-    assert(node->selected_bucket != NULL);
-    assert(IN_FIB == node->status);
+    if (IN_FIB == node->status)
+      p->leaves++;
 
-    create_route_ip6(p, node->original_bucket, addr);
-    *count += 1;
-    p->leaves++;
     return;
   }