]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/main.c
Merge pull request #6164 from ton31337/feature/rfc8212_enabled_traditional_profile
[mirror_frr.git] / zebra / main.c
index f23702d8789d6d050068e8906ea76ab21c984117..e230a744f64d6e5e47971e3bd993e4405557e82a 100644 (file)
@@ -53,6 +53,8 @@
 #include "zebra/zebra_rnh.h"
 #include "zebra/zebra_pbr.h"
 #include "zebra/zebra_vxlan.h"
+#include "zebra/zebra_routemap.h"
+#include "zebra/zebra_nb.h"
 
 #if defined(HANDLE_NETLINK_FUZZING)
 #include "zebra/kernel_netlink.h"
@@ -173,13 +175,20 @@ static void sigint(void)
                work_queue_free_and_null(&zrouter.lsp_process_q);
 
        vrf_terminate();
+       rtadv_terminate();
 
        ns_walk_func(zebra_ns_early_shutdown);
        zebra_ns_notify_close();
 
        access_list_reset();
        prefix_list_reset();
-       route_map_finish();
+       /*
+        * zebra_routemap_finish will
+        * 1 set rmap upd timer to 0 so that rmap update wont be scheduled again
+        * 2 Put off the rmap update thread
+        * 3 route_map_finish
+        */
+       zebra_routemap_finish();
 
        list_delete(&zrouter.client_list);
 
@@ -237,6 +246,9 @@ struct quagga_signal_t zebra_signals[] = {
 
 static const struct frr_yang_module_info *const zebra_yang_modules[] = {
        &frr_interface_info,
+       &frr_route_map_info,
+       &frr_zebra_info,
+       &frr_vrf_info,
 };
 
 FRR_DAEMON_INFO(
@@ -321,17 +333,21 @@ int main(int argc, char **argv)
                case 'a':
                        allow_delete = 1;
                        break;
-               case 'e':
-                       zrouter.multipath_num = atoi(optarg);
-                       if (zrouter.multipath_num > MULTIPATH_NUM
-                           || zrouter.multipath_num <= 0) {
+               case 'e': {
+                       unsigned long int parsed_multipath =
+                               strtoul(optarg, NULL, 10);
+                       if (parsed_multipath == 0
+                           || parsed_multipath > MULTIPATH_NUM
+                           || parsed_multipath > UINT32_MAX) {
                                flog_err(
                                        EC_ZEBRA_BAD_MULTIPATH_NUM,
-                                       "Multipath Number specified must be less than %d and greater than 0",
+                                       "Multipath Number specified must be less than %u and greater than 0",
                                        MULTIPATH_NUM);
                                return 1;
                        }
+                       zrouter.multipath_num = parsed_multipath;
                        break;
+               }
                case 'o':
                        vrf_default_name_configured = optarg;
                        break;