diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-11-09 00:42:02 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2015-11-09 00:42:02 +0100 |
commit | 9b9a7143c43d01f0459d40363d56e9c7690c596f (patch) | |
tree | 45571f60f4e3582cd4c0c17c3f1de1c3a2da35dc /nest/rt-roa.c | |
parent | 3aed0a6ff7b2b811a535202fd787281d2ac33409 (diff) |
Conf: Fixes bug in symbol lookup during reconfiguration
Symbol lookup by cf_find_symbol() not only did the lookup but also added
new void symbols allocated from cfg_mem linpool, which gets broken when
lookups are done outside of config parsing, which may lead to crashes
during reconfiguration.
The patch separates lookup-only cf_find_symbol() and config-modifying
cf_get_symbol(), while the later is called only during parsing. Also
new_config and cfg_mem global variables are NULLed outside of parsing.
Diffstat (limited to 'nest/rt-roa.c')
-rw-r--r-- | nest/rt-roa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nest/rt-roa.c b/nest/rt-roa.c index aa453f16..0fd89667 100644 --- a/nest/rt-roa.c +++ b/nest/rt-roa.c @@ -311,7 +311,7 @@ roa_commit(struct config *new, struct config *old) if (old) WALK_LIST(t, roa_table_list) { - struct symbol *sym = cf_find_symbol(t->name); + struct symbol *sym = cf_find_symbol(new, t->name); if (sym && sym->class == SYM_ROA) { /* Found old table in new config */ |