0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Memory allocation in ospf_area changed.

This commit is contained in:
Ondrej Filip 2000-02-25 14:26:54 +00:00
parent 2d496d2028
commit b786df7035
3 changed files with 2 additions and 3 deletions

View File

@ -25,7 +25,6 @@ ospf_start(struct proto *p)
po->areano=0; /* Waiting for interfaces comming up */ po->areano=0; /* Waiting for interfaces comming up */
po->firstarea=NULL; po->firstarea=NULL;
po->areaslab=sl_new(p->pool, sizeof(struct ospf_area));
return PS_UP; return PS_UP;
} }

View File

@ -220,7 +220,6 @@ struct proto_ospf {
list iface_list; /* Interfaces we really use */ list iface_list; /* Interfaces we really use */
int areano; /* Number of area I belong to */ int areano; /* Number of area I belong to */
struct ospf_area *firstarea; struct ospf_area *firstarea;
slab *areaslab;
}; };
static int ospf_start(struct proto *p); static int ospf_start(struct proto *p);

View File

@ -46,10 +46,11 @@ addifa_rtlsa(struct ospf_iface *ifa)
{ {
po->areano++; po->areano++;
oa=po->firstarea; oa=po->firstarea;
po->firstarea=sl_alloc(po->areaslab); po->firstarea=mb_alloc(po->proto.pool, sizeof(struct ospf_area));
po->firstarea->next=oa; po->firstarea->next=oa;
po->firstarea->areaid=ifa->area; po->firstarea->areaid=ifa->area;
po->firstarea->gr=ospf_top_new(po); po->firstarea->gr=ospf_top_new(po);
DBG("%s: New OSPF area \"%d\" added.\n", po->proto.name, ifa->area);
} }
/* FIXME Go on, change router lsa, bits and so on... */ /* FIXME Go on, change router lsa, bits and so on... */