diff options
author | Maria Matejka <mq@ucw.cz> | 2023-03-09 16:34:17 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-04 17:00:58 +0200 |
commit | 765bf99b695a9525fe4dfbc3f5e0bb90f56826d0 (patch) | |
tree | 726b3942dd06d55b30a257be936f8a9bca0edcc4 /nest | |
parent | 88fc87afe631f6600e82c3f7135f6003a9c729b6 (diff) |
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.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/rt-table.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index 218fcbe7..4c71663b 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -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]) |