From 397fec4741b40f61d06a467b4110aad7e996485c Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 1 Sep 2022 14:21:56 +0200 Subject: Default tables are not created unless actually used. This allows for setting default table values at the beginning of config file before "master4" and "master6" tables are initialized. --- proto/static/static.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'proto/static/static.c') diff --git a/proto/static/static.c b/proto/static/static.c index 65f3eccc..cb764a1c 100644 --- a/proto/static/static.c +++ b/proto/static/static.c @@ -436,11 +436,11 @@ static_postconfig(struct proto_config *CF) if (!cf->igp_table_ip4) cf->igp_table_ip4 = (cc->table->addr_type == NET_IP4) ? - cc->table : cf->c.global->def_tables[NET_IP4]; + cc->table : rt_get_default_table(cf->c.global, NET_IP4); if (!cf->igp_table_ip6) cf->igp_table_ip6 = (cc->table->addr_type == NET_IP6) ? - cc->table : cf->c.global->def_tables[NET_IP6]; + cc->table : rt_get_default_table(cf->c.global, NET_IP6); WALK_LIST(r, cf->routes) if (r->net && (r->net->type != CF->net_type)) -- cgit v1.2.3