diff options
Diffstat (limited to 'zebra/main.c')
| -rw-r--r-- | zebra/main.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/zebra/main.c b/zebra/main.c index 5951c7e280..fb7e926c5c 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -53,6 +53,7 @@ #include "zebra/zebra_rnh.h" #include "zebra/zebra_pbr.h" #include "zebra/zebra_vxlan.h" +#include "zebra/zebra_routemap.h" #if defined(HANDLE_NETLINK_FUZZING) #include "zebra/kernel_netlink.h" @@ -173,13 +174,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); @@ -238,6 +246,7 @@ 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_DAEMON_INFO( @@ -322,17 +331,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; |
