summaryrefslogtreecommitdiff
path: root/nest/config.Y
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-09-01 14:21:56 +0200
committerMaria Matejka <mq@ucw.cz>2022-09-01 17:44:46 +0200
commit397fec4741b40f61d06a467b4110aad7e996485c (patch)
tree4bd33355175e42df9e3b7dee5517c19d4d6e337d /nest/config.Y
parent34912b029b161cbbed44057dfa913669ccb087eb (diff)
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.
Diffstat (limited to 'nest/config.Y')
-rw-r--r--nest/config.Y7
1 files changed, 6 insertions, 1 deletions
diff --git a/nest/config.Y b/nest/config.Y
index 91147a29..4bf0fefe 100644
--- a/nest/config.Y
+++ b/nest/config.Y
@@ -361,7 +361,11 @@ channel_end:
proto_channel: channel_start channel_opt_list channel_end;
-rtable: CF_SYM_KNOWN { cf_assert_symbol($1, SYM_TABLE); $$ = $1->table; } ;
+rtable: CF_SYM_KNOWN {
+ cf_assert_symbol($1, SYM_TABLE);
+ if (!$1->table) rt_new_default_table($1);
+ $$ = $1->table;
+} ;
imexport:
FILTER filter { $$ = $2; }
@@ -683,6 +687,7 @@ r_args:
}
| r_args TABLE symbol_known {
cf_assert_symbol($3, SYM_TABLE);
+ if (!$3->table) cf_error("Table %s not configured", $3->name);
$$ = $1;
rt_show_add_table($$, $3->table->table);
$$->tables_defined_by = RSD_TDB_DIRECT;