0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Fixed default table configuration

When changing default table behavior, I missed that it enabled to
configure multiple master4 and master6 tables. Now BIRD recognizes it
and fails properly.
This commit is contained in:
Maria Matejka 2023-03-09 16:34:17 +01:00
parent 88fc87afe6
commit 765bf99b69

View File

@ -3939,6 +3939,7 @@ rt_new_default_table(struct symbol *s)
for (uint addr_type = 0; addr_type < NET_MAX; addr_type++)
if (s == new_config->def_tables[addr_type])
{
ASSERT_DIE(!s->table);
s->table = rt_new_table(s, addr_type);
return;
}
@ -3962,6 +3963,9 @@ rt_get_default_table(struct config *cf, uint addr_type)
struct rtable_config *
rt_new_table(struct symbol *s, uint addr_type)
{
if (s->table)
cf_error("Duplicate configuration of table %s", s->name);
struct rtable_config *c = cfg_allocz(sizeof(struct rtable_config));
if (s == new_config->def_tables[addr_type])