summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_area.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_area.c')
-rw-r--r--ospf6d/ospf6_area.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c
index a0cb455798..78b2ffbcf3 100644
--- a/ospf6d/ospf6_area.c
+++ b/ospf6d/ospf6_area.c
@@ -39,6 +39,8 @@
#include "ospf6_spf.h"
#include "ospf6_top.h"
#include "ospf6_area.h"
+#include "ospf6_message.h"
+#include "ospf6_neighbor.h"
#include "ospf6_interface.h"
#include "ospf6_intra.h"
#include "ospf6_abr.h"
@@ -348,9 +350,17 @@ void ospf6_area_delete(struct ospf6_area *oa)
* deleting an area.
* So just detach the interface from the area and
* keep it around. */
- for (ALL_LIST_ELEMENTS_RO(oa->if_list, n, oi))
+ for (ALL_LIST_ELEMENTS_RO(oa->if_list, n, oi)) {
oi->area = NULL;
+ struct listnode *node;
+ struct listnode *nnode;
+ struct ospf6_neighbor *on;
+
+ for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on))
+ ospf6_neighbor_delete(on);
+ }
+
list_delete(&oa->if_list);
ospf6_lsdb_delete(oa->lsdb);