* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING. If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
static void __attribute__((noreturn)) ospf6_exit(int status)
{
- struct listnode *node;
+ struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT);
struct interface *ifp;
+ frr_early_fini();
+
if (ospf6)
ospf6_delete(ospf6);
bfd_gbl_exit();
- for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp))
+ FOR_ALL_INTERFACES (vrf, ifp)
if (ifp->info != NULL)
ospf6_interface_delete(ifp->info);
ospf6_asbr_terminate();
ospf6_lsa_terminate();
- vrf_terminate();
- vty_terminate();
- cmd_terminate();
+ /* reverse access_list_init */
+ access_list_reset();
- if (zclient)
- zclient_free(zclient);
+ /* reverse prefix_list_init */
+ prefix_list_add_hook(NULL);
+ prefix_list_delete_hook(NULL);
+ prefix_list_reset();
- if (master)
- thread_master_free(master);
+ vrf_terminate();
- closezlog();
+ if (zclient) {
+ zclient_stop(zclient);
+ zclient_free(zclient);
+ }
+ frr_fini();
exit(status);
}
static void sigterm(void)
{
zlog_notice("Terminating on signal SIGTERM");
- ospf6_clean();
ospf6_exit(0);
}
exit(1);
}
+ /* OSPF6 master init. */
+ ospf6_master_init();
+
/* thread master */
master = frr_init();
- vrf_init();
+ vrf_init(NULL, NULL, NULL, NULL, NULL);
access_list_init();
prefix_list_init();