diff options
author | Maria Matejka <mq@ucw.cz> | 2021-04-19 15:13:20 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2021-04-19 15:14:55 +0200 |
commit | 3d90241f62393e6d614c1d20fde4013c9ff24685 (patch) | |
tree | 40b244493136565888f34706aea662a1363a60e1 /nest/rt-table.c | |
parent | a7c9515ebc88c42f26ce97255c98b2e61ad52934 (diff) |
Internal route tables have a reduced cleanup routine
This fixes an internal table cleanup bug introduced
in ff397df7edcbe7a8abca5b419729b9c64c063847.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index d2fc9c65..13209dd7 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -1880,6 +1880,9 @@ rt_free(resource *_r) DBG("Deleting routing table %s\n", r->name); ASSERT_DIE(r->use_count == 0); + if (r->internal) + return; + r->config->table = NULL; rem_node(&r->n); @@ -1931,7 +1934,7 @@ rt_setup(pool *pp, struct rtable_config *cf) fib_init(&t->fib, p, t->addr_type, sizeof(net), OFFSETOF(net, n), 0, NULL); - if (!cf->internal) + if (!(t->internal = cf->internal)) { init_list(&t->channels); hmap_init(&t->id_map, p, 1024); |