1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

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.
This commit is contained in:
Maria Matejka
2022-09-01 14:21:56 +02:00
parent 34912b029b
commit 397fec4741
8 changed files with 56 additions and 19 deletions

View File

@@ -1934,7 +1934,7 @@ bgp_default_igp_table(struct bgp_config *cf, struct bgp_channel_config *cc, u32
return cc2->c.table;
/* Last, try default table of given type */
if (tab = cf->c.global->def_tables[type])
if (tab = rt_get_default_table(cf->c.global, type))
return tab;
cf_error("Undefined IGP table");
@@ -1953,7 +1953,7 @@ bgp_default_base_table(struct bgp_config *cf, struct bgp_channel_config *cc)
return cc2->c.table;
/* Last, try default table of given type */
struct rtable_config *tab = cf->c.global->def_tables[type];
struct rtable_config *tab = rt_get_default_table(cf->c.global, type);
if (tab)
return tab;