]> 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 306372ccdb841c3f7397954bcf22e8183b7eb05d..e230a744f64d6e5e47971e3bd993e4405557e82a 100644 (file)
@@ -54,6 +54,7 @@
 #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"
@@ -247,6 +248,7 @@ 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(
@@ -331,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;