mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-09 12:48:43 +00:00
Internal route tables have a reduced cleanup routine
This fixes an internal table cleanup bug introduced
in ff397df7ed
.
This commit is contained in:
parent
a7c9515ebc
commit
3d90241f62
@ -164,6 +164,9 @@ typedef struct rtable {
|
||||
int pipe_busy; /* Pipe loop detection */
|
||||
int use_count; /* Number of protocols using this table */
|
||||
u32 rt_count; /* Number of routes in the table */
|
||||
|
||||
byte internal; /* Internal table of a protocol */
|
||||
|
||||
struct hmap id_map;
|
||||
struct hostcache *hostcache;
|
||||
struct rtable_config *config; /* Configuration of this table */
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user