]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/main.c
*: Rename thread.[ch] to event.[ch]
[mirror_frr.git] / zebra / main.c
index 3de97943fd1629581098c6cbef32f9b830a94fe7..49b928d09cb6b430aaeed8879aa6575c16045d7e 100644 (file)
@@ -1,21 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* zebra daemon main routine.
  * Copyright (C) 1997, 98 Kunihiro Ishiguro
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * 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 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>
@@ -23,7 +8,7 @@
 #include <lib/version.h>
 #include "getopt.h"
 #include "command.h"
-#include "thread.h"
+#include "event.h"
 #include "filter.h"
 #include "memory.h"
 #include "prefix.h"
@@ -33,6 +18,7 @@
 #include "sigevent.h"
 #include "vrf.h"
 #include "libfrr.h"
+#include "affinitymap.h"
 #include "routemap.h"
 #include "routing_nb.h"
 
@@ -221,12 +207,12 @@ void zebra_finalize(struct thread *dummy)
 {
        zlog_info("Zebra final shutdown");
 
-       /* Final shutdown of ns resources */
-       ns_walk_func(zebra_ns_final_shutdown, NULL, NULL);
-
        /* Stop dplane thread and finish any cleanup */
        zebra_dplane_shutdown();
 
+       /* Final shutdown of ns resources */
+       ns_walk_func(zebra_ns_final_shutdown, NULL, NULL);
+
        zebra_router_terminate();
 
        ns_terminate();
@@ -259,6 +245,7 @@ struct frr_signal_t zebra_signals[] = {
        },
 };
 
+/* clang-format off */
 static const struct frr_yang_module_info *const zebra_yang_modules[] = {
        &frr_filter_info,
        &frr_interface_info,
@@ -266,8 +253,10 @@ static const struct frr_yang_module_info *const zebra_yang_modules[] = {
        &frr_zebra_info,
        &frr_vrf_info,
        &frr_routing_info,
+       &frr_affinity_map_info,
        &frr_zebra_route_map_info,
 };
+/* clang-format on */
 
 FRR_DAEMON_INFO(
        zebra, ZEBRA, .vty_port = ZEBRA_VTY_PORT, .flags = FRR_NO_ZCLIENT,