From 5a810eea711e679d964b6494b365de9f902741a8 Mon Sep 17 00:00:00 2001 From: Igor Putovny Date: Tue, 11 Feb 2025 14:02:09 +0100 Subject: [PATCH] Small changes --- proto/aggregator/aggregator.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index 1a0097d65..58b34ccab 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -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)); -- 2.47.2