mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-01-08 18:11:54 +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:
parent
88fc87afe6
commit
765bf99b69
@ -3939,6 +3939,7 @@ rt_new_default_table(struct symbol *s)
|
|||||||
for (uint addr_type = 0; addr_type < NET_MAX; addr_type++)
|
for (uint addr_type = 0; addr_type < NET_MAX; addr_type++)
|
||||||
if (s == new_config->def_tables[addr_type])
|
if (s == new_config->def_tables[addr_type])
|
||||||
{
|
{
|
||||||
|
ASSERT_DIE(!s->table);
|
||||||
s->table = rt_new_table(s, addr_type);
|
s->table = rt_new_table(s, addr_type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3962,6 +3963,9 @@ rt_get_default_table(struct config *cf, uint addr_type)
|
|||||||
struct rtable_config *
|
struct rtable_config *
|
||||||
rt_new_table(struct symbol *s, uint addr_type)
|
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));
|
struct rtable_config *c = cfg_allocz(sizeof(struct rtable_config));
|
||||||
|
|
||||||
if (s == new_config->def_tables[addr_type])
|
if (s == new_config->def_tables[addr_type])
|
||||||
|
Loading…
Reference in New Issue
Block a user