* On ospf_terminate(), proceed to clear the ospfd global variables even
when no OSPF instance is configured
* Remove double call to route_map_finish()
* Call ospf_opaque_term() to clear the opaque LSA infrastructure
* Clear the `OspfRI.area_info` and `om->ospf` global lists.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
void ospf_router_info_term(void)
{
+ list_delete(&OspfRI.area_info);
list_delete(&OspfRI.pce_info.pce_domain);
list_delete(&OspfRI.pce_info.pce_neighbor);
SET_FLAG(om->options, OSPF_MASTER_SHUTDOWN);
- /* Skip some steps if OSPF not actually running */
- if (listcount(om->ospf) == 0)
- goto done;
-
for (ALL_LIST_ELEMENTS(om->ospf, node, nnode, ospf))
ospf_finish(ospf);
/* Cleanup vrf info */
ospf_vrf_terminate();
- route_map_finish();
-
keychain_terminate();
+
+ ospf_opaque_term();
+ list_delete(&om->ospf);
+
/* Deliberately go back up, hopefully to thread scheduler, as
* One or more ospf_finish()'s may have deferred shutdown to a timer
* thread
zclient_stop(zclient_sync);
zclient_free(zclient_sync);
-done:
frr_fini();
}