From: Igor Putovny Date: Wed, 11 Dec 2024 14:14:42 +0000 (+0100) Subject: Leaves don't have to be IN_FIB since we are not removing NON_FIB leaves anymore X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0be29539fd22dff5090a7953cdca85d4920846d;p=thirdparty%2Fbird.git Leaves don't have to be IN_FIB since we are not removing NON_FIB leaves anymore --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 08c38dc45..dedb22d9c 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -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; }