From: Igor Putovny Date: Mon, 10 Feb 2025 15:55:48 +0000 (+0100) Subject: Initialize root node with NON_FIB status X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4833068cbd192608658bde20a70cfc40c0f3d2ec;p=thirdparty%2Fbird.git Initialize root node with NON_FIB status --- diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index b020c1364..d2bad701f 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -2203,8 +2203,6 @@ aggregator_init(struct proto_config *CF) static void trie_init(struct aggregator_proto *p) { - p->root = create_new_node(p->trie_pool); - struct network *default_net = NULL; if (p->addr_type == NET_IP4) @@ -2224,6 +2222,9 @@ trie_init(struct aggregator_proto *p) log("Creating net %p for default route %N", default_net, default_net->n.addr); } + /* Create root node */ + p->root = create_new_node(p->trie_pool); + /* Create route attributes with zero nexthop */ struct rta rta = { 0 }; @@ -2256,10 +2257,13 @@ trie_init(struct aggregator_proto *p) HASH_INSERT2(p->routes, AGGR_RTE, p->p.pool, arte); HASH_INSERT2(p->buckets, AGGR_BUCK, p->p.pool, new_bucket); - /* Initialize root node with default route */ + /* + * Root node is initialized with NON_FIB status. + * Default route will be created duing third pass. + */ *p->root = (struct trie_node) { .original_bucket = new_bucket, - .status = IN_FIB, + .status = NON_FIB, .px_origin = ORIGINAL, .depth = 0, };