]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/main.c
*: un-split strings across lines
[mirror_frr.git] / zebra / main.c
index f447e9aa0776ca77c211bc4b00010667e4a66d76..748e43b8d98ed4396b7c9272ec642ee7f3e3019a 100644 (file)
@@ -55,6 +55,7 @@
 #include "zebra/zebra_vxlan.h"
 #include "zebra/zebra_routemap.h"
 #include "zebra/zebra_nb.h"
+#include "zebra/zebra_opaque.h"
 
 #if defined(HANDLE_NETLINK_FUZZING)
 #include "zebra/kernel_netlink.h"
@@ -151,18 +152,25 @@ static void sigint(void)
 
        frr_early_fini();
 
+       /* Stop the opaque module pthread */
+       zebra_opaque_stop();
+
        zebra_dplane_pre_finish();
 
        /* Clean up GR related info. */
        zebra_gr_stale_client_cleanup(zrouter.stale_client_list);
        list_delete_all_node(zrouter.stale_client_list);
 
+       /* Clean up zapi clients and server module */
        for (ALL_LIST_ELEMENTS(zrouter.client_list, ln, nn, client))
                zserv_close_client(client);
 
        zserv_close();
        list_delete_all_node(zrouter.client_list);
 
+       /* Once all the zclients are cleaned up, clean up the opaque module */
+       zebra_opaque_finish();
+
        zebra_ptm_finish();
 
        if (retain_mode)
@@ -245,6 +253,7 @@ struct quagga_signal_t zebra_signals[] = {
 };
 
 static const struct frr_yang_module_info *const zebra_yang_modules[] = {
+       &frr_filter_info,
        &frr_interface_info,
        &frr_route_map_info,
        &frr_zebra_info,
@@ -255,8 +264,7 @@ FRR_DAEMON_INFO(
        zebra, ZEBRA, .vty_port = ZEBRA_VTY_PORT, .flags = FRR_NO_ZCLIENT,
 
        .proghelp =
-               "Daemon which manages kernel routing table management "
-               "and\nredistribution between different routing protocols.",
+               "Daemon which manages kernel routing table management and\nredistribution between different routing protocols.",
 
        .signals = zebra_signals, .n_signals = array_size(zebra_signals),
 
@@ -427,6 +435,7 @@ int main(int argc, char **argv)
        zebra_mpls_vty_init();
        zebra_pw_vty_init();
        zebra_pbr_init();
+       zebra_opaque_init();
 
 /* For debug purpose. */
 /* SET_FLAG (zebra_debug_event, ZEBRA_DEBUG_EVENT); */
@@ -458,6 +467,9 @@ int main(int argc, char **argv)
        /* Start dataplane system */
        zebra_dplane_start();
 
+       /* Start the ted module, before zserv */
+       zebra_opaque_start();
+
        /* Start Zebra API server */
        zserv_start(zserv_path);