summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 67e34f21..33a83b4d 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -225,7 +225,7 @@ ospf_if_new (struct ospf *ospf, struct interface *ifp, struct prefix *p)
oi->network_lsa_self = NULL;
/* Initialize neighbor list. */
- oi->nbrs = route_table_init ();
+ oi->nbrs = list_new ();
/* Initialize static neighbor list. */
oi->nbr_nbma = list_new ();
@@ -260,7 +260,6 @@ ospf_if_new (struct ospf *ospf, struct interface *ifp, struct prefix *p)
void
ospf_if_cleanup (struct ospf_interface *oi)
{
- struct route_node *rn;
struct listnode *node, *nnode;
struct ospf_neighbor *nbr;
struct ospf_nbr_nbma *nbr_nbma;
@@ -284,10 +283,9 @@ ospf_if_cleanup (struct ospf_interface *oi)
}
/* send Neighbor event KillNbr to all associated neighbors. */
- for (rn = route_top (oi->nbrs); rn; rn = route_next (rn))
- if ((nbr = rn->info) != NULL)
- if (nbr != oi->nbr_self)
- OSPF_NSM_EVENT_EXECUTE (nbr, NSM_KillNbr);
+ for (ALL_LIST_ELEMENTS (oi->nbrs, node, nnode, nbr))
+ if (nbr != oi->nbr_self)
+ OSPF_NSM_EVENT_EXECUTE (nbr, NSM_KillNbr);
/* Cleanup Link State Acknowlegdment list. */
for (ALL_LIST_ELEMENTS (oi->ls_ack, node, nnode, lsa))
@@ -323,7 +321,7 @@ ospf_if_free (struct ospf_interface *oi)
/* Free Pseudo Neighbour */
ospf_nbr_delete (oi->nbr_self);
- route_table_finish (oi->nbrs);
+ list_free (oi->nbrs);
route_table_finish (oi->ls_upd_queue);
/* Free any lists that should be freed */