#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"
* 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);
hash_clean(aggr->match_extnl_hash,
ospf6_aggr_unlink_external_info);
+ if (aggr->route) {
+ if (aggr->route->route_option)
+ XFREE(MTYPE_OSPF6_EXTERNAL_INFO,
+ aggr->route->route_option);
+
+ ospf6_route_delete(aggr->route);
+ }
+
if (IS_OSPF6_DEBUG_AGGR)
zlog_debug("%s: Release the aggregator Address(%pFX)",
__func__,