diff options
author | Ondrej Filip <feela@network.cz> | 2018-03-22 13:25:58 +0100 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2018-03-22 13:25:58 +0100 |
commit | 966602602a0f24942bee3ab0492bbb9197e71aa1 (patch) | |
tree | d0c284bf4a9d6038e938583606b23b02d437b7d1 /nest/rt-table.c | |
parent | 44062812600bd29f8edf30ebc871ff218069c5a2 (diff) | |
parent | 4841804fffd8bf669b2445ec3328b6a49eed31f9 (diff) |
Merge branch 'int-new' of ssh://gitlab.labs.nic.cz/labs/bird into int-new
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index 686d0e84..b885c6e3 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -2076,6 +2076,13 @@ rt_unlock_table(rtable *r) } } +static struct rtable_config * +rt_find_table_config(struct config *cf, char *name) +{ + struct symbol *sym = cf_find_symbol(cf, name); + return (sym && (sym->class == SYM_TABLE)) ? sym->def : NULL; +} + /** * rt_commit - commit new routing table configuration * @new: new configuration @@ -2101,11 +2108,10 @@ rt_commit(struct config *new, struct config *old) rtable *ot = o->table; if (!ot->deleted) { - struct symbol *sym = cf_find_symbol(new, o->name); - if (sym && sym->class == SYM_TABLE && !new->shutdown) + r = rt_find_table_config(new, o->name); + if (r && (r->addr_type == o->addr_type) && !new->shutdown) { DBG("\t%s: same\n", o->name); - r = sym->def; r->table = ot; ot->name = r->name; ot->config = r; |