From 18c031fae8945409b0ff1139d88092ba19ec2780 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 8 May 2000 10:13:59 +0000 Subject: Debugged printing and pruning of neighbor cache entries. --- nest/neighbor.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'nest/neighbor.c') diff --git a/nest/neighbor.c b/nest/neighbor.c index ef1df865..55222383 100644 --- a/nest/neighbor.c +++ b/nest/neighbor.c @@ -128,7 +128,8 @@ neigh_dump_all(void) WALK_LIST(n, sticky_neigh_list) neigh_dump(n); for(i=0; iproto->core_state != FS_FLUSHING) + return; + rem_node(&n->n); + if (n->iface) + rem_node(&n->if_n); + sl_free(neigh_slab, n); +} + void neigh_prune(void) { @@ -181,13 +193,9 @@ neigh_prune(void) DBG("Pruning neighbors\n"); for(i=0; iproto->core_state == FS_FLUSHING) - { - rem_node(&n->n); - if (n->iface) - rem_node(&n->if_n); - sl_free(neigh_slab, n); - } + neigh_prune_one(n); + WALK_LIST_DELSAFE(n, m, sticky_neigh_list) + neigh_prune_one(n); } void -- cgit v1.2.3