1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Merge commit '3a6eda995ecfcebff3130d86ee3baeab12a41335' into haugesund

This commit is contained in:
Maria Matejka
2022-05-30 15:15:19 +02:00
6 changed files with 241 additions and 22 deletions

View File

@@ -2212,12 +2212,7 @@ static struct resclass rt_class = {
rtable *
rt_setup(pool *pp, struct rtable_config *cf)
{
int ns = strlen("Routing table ") + strlen(cf->name) + 1;
void *nb = mb_alloc(pp, ns);
ASSERT_DIE(ns - 1 == bsnprintf(nb, ns, "Routing table %s", cf->name));
pool *p = rp_new(pp, nb);
mb_move(nb, p);
pool *p = rp_newf(pp, "Routing table %s", cf->name);
rtable *t = ralloc(p, &rt_class);
t->rp = p;