summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/cf-lex.l4
-rw-r--r--conf/conf.c3
-rw-r--r--conf/conf.h4
3 files changed, 9 insertions, 2 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l
index 593df9d6..4f69993e 100644
--- a/conf/cf-lex.l
+++ b/conf/cf-lex.l
@@ -561,6 +561,8 @@ cf_new_symbol(const byte *c)
HASH_INSERT2(new_config->sym_hash, SYM, new_config->pool, s);
+ add_tail(&(new_config->symbols), &(s->n));
+
return s;
}
@@ -576,7 +578,7 @@ cf_new_symbol(const byte *c)
* signify no match.
*/
struct symbol *
-cf_find_symbol(struct config *cfg, const byte *c)
+cf_find_symbol(const struct config *cfg, const byte *c)
{
struct symbol *s;
diff --git a/conf/conf.c b/conf/conf.c
index 439aa41d..b0980d7e 100644
--- a/conf/conf.c
+++ b/conf/conf.c
@@ -98,6 +98,7 @@ config_alloc(const char *name)
memcpy(ndup, name, nlen);
init_list(&c->tests);
+ init_list(&c->symbols);
c->mrtdump_file = -1; /* Hack, this should be sysdep-specific */
c->pool = p;
c->mem = l;
@@ -258,6 +259,8 @@ config_do_commit(struct config *c, int type)
if (old_config)
old_config->obstacle_count++;
+ DBG("filter_commit\n");
+ filter_commit(c, old_config);
DBG("sysdep_commit\n");
int force_restart = sysdep_commit(c, old_config);
DBG("global_commit\n");
diff --git a/conf/conf.h b/conf/conf.h
index acb3413b..f14c0e21 100644
--- a/conf/conf.h
+++ b/conf/conf.h
@@ -24,6 +24,7 @@ struct config {
list tables; /* Configured routing tables (struct rtable_config) */
list logfiles; /* Configured log files (sysdep) */
list tests; /* Configured unit tests (f_bt_test_suite) */
+ list symbols; /* Configured symbols in config order */
int mrtdump_file; /* Configured MRTDump file (sysdep, fd in unix) */
char *syslog_name; /* Name used for syslog (NULL -> no syslog) */
@@ -103,6 +104,7 @@ void cfg_copy_list(list *dest, list *src, unsigned node_size);
extern int (*cf_read_hook)(byte *buf, uint max, int fd);
struct symbol {
+ node n; /* In list of symbols in config */
struct symbol *next;
struct sym_scope *scope;
int class; /* SYM_* */
@@ -167,7 +169,7 @@ int cf_lex(void);
void cf_lex_init(int is_cli, struct config *c);
void cf_lex_unwind(void);
-struct symbol *cf_find_symbol(struct config *cfg, const byte *c);
+struct symbol *cf_find_symbol(const struct config *cfg, const byte *c);
struct symbol *cf_get_symbol(const byte *c);
struct symbol *cf_default_name(char *template, int *counter);