summaryrefslogtreecommitdiffstats
path: root/proto/ospf/hello.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2004-06-01 15:12:10 +0200
committerOndrej Filip <feela@network.cz>2004-06-01 15:12:10 +0200
commit035f6acbfec1e06a207217ae81153b67ced995f3 (patch)
tree0f30c642631e1a0d370ac45e17c99d13ab4c7332 /proto/ospf/hello.c
parent8281ff201e1eebe35cb8e7716565361bed77a6cd (diff)
downloadbird-035f6acbfec1e06a207217ae81153b67ced995f3.tar
bird-035f6acbfec1e06a207217ae81153b67ced995f3.zip
Patch from Andreas Steinmetz <ast@domdv.de>
Diffstat (limited to 'proto/ospf/hello.c')
-rw-r--r--proto/ospf/hello.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/proto/ospf/hello.c b/proto/ospf/hello.c
index b87b5ca..e6dc7ab 100644
--- a/proto/ospf/hello.c
+++ b/proto/ospf/hello.c
@@ -19,7 +19,7 @@ install_inactim(struct ospf_neighbor *n)
if(n->inactim==NULL)
{
- n->inactim=tm_new(p->pool);
+ n->inactim=tm_new(n->pool);
n->inactim->data=n;
n->inactim->randomize=0;
n->inactim->hook=neighbor_timer_hook;
@@ -64,6 +64,7 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p,
ip_addr mask;
char *beg=": Bad OSPF hello packet from ", *rec=" received: ";
int eligible=0;
+ pool *pool;
nrid=ntohl(((struct ospf_packet *)ps)->routerid);
@@ -130,7 +131,9 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p,
}
OSPF_TRACE(D_EVENTS, "New neighbor found: %I on %s.", faddr,
ifa->iface->name);
- n=mb_allocz(p->pool, sizeof(struct ospf_neighbor));
+ pool=rp_new(p->pool, "OSPF Neighbor");
+ n=mb_allocz(pool, sizeof(struct ospf_neighbor));
+ n->pool=pool;
add_tail(&ifa->neigh_list, NODE n);
n->rid=nrid;
n->ip=faddr;
@@ -142,23 +145,23 @@ ospf_hello_rx(struct ospf_hello_packet *ps, struct proto *p,
n->options=ps->options;
n->ifa=ifa;
n->adj=0;
- n->ldbdes=mb_alloc(p->pool, ifa->iface->mtu);
+ n->ldbdes=mb_alloc(pool, ifa->iface->mtu);
n->state=NEIGHBOR_DOWN;
install_inactim(n);
- n->rxmt_timer=tm_new(p->pool);
+ n->rxmt_timer=tm_new(pool);
n->rxmt_timer->data=n;
n->rxmt_timer->randomize=0;
n->rxmt_timer->hook=rxmt_timer_hook;
n->rxmt_timer->recurrent=ifa->rxmtint;
DBG("%s: Installing rxmt timer.\n", p->name);
- n->lsrr_timer=tm_new(p->pool);
+ n->lsrr_timer=tm_new(pool);
n->lsrr_timer->data=n;
n->lsrr_timer->randomize=0;
n->lsrr_timer->hook=lsrr_timer_hook;
n->lsrr_timer->recurrent=ifa->rxmtint;
DBG("%s: Installing lsrr timer.\n", p->name);
init_list(&n->ackl);
- n->ackd_timer=tm_new(p->pool);
+ n->ackd_timer=tm_new(pool);
n->ackd_timer->data=n;
n->ackd_timer->randomize=0;
n->ackd_timer->hook=ackd_timer_hook;