diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c index 9327b42f52..74fcad628b 100644 --- a/pimd/pim6_cmd.c +++ b/pimd/pim6_cmd.c @@ -2145,6 +2145,21 @@ DEFPY (debug_pimv6_trace_detail, return CMD_SUCCESS; } +DEFPY (debug_pimv6_zebra, + debug_pimv6_zebra_cmd, + "[no] debug pimv6 zebra", + NO_STR + DEBUG_STR + DEBUG_PIMV6_STR + DEBUG_PIMV6_ZEBRA_STR) +{ + if (!no) + PIM_DO_DEBUG_ZEBRA; + else + PIM_DONT_DEBUG_ZEBRA; + return CMD_SUCCESS; +} + void pim_cmd_init(void) { if_cmd_init(pim_interface_config_write); @@ -2265,6 +2280,7 @@ void pim_cmd_init(void) install_element(ENABLE_NODE, &debug_pimv6_packetdump_recv_cmd); install_element(ENABLE_NODE, &debug_pimv6_trace_cmd); install_element(ENABLE_NODE, &debug_pimv6_trace_detail_cmd); + install_element(ENABLE_NODE, &debug_pimv6_zebra_cmd); install_element(CONFIG_NODE, &debug_pimv6_cmd); install_element(CONFIG_NODE, &debug_pimv6_nht_cmd); @@ -2275,4 +2291,5 @@ void pim_cmd_init(void) install_element(CONFIG_NODE, &debug_pimv6_packetdump_recv_cmd); install_element(CONFIG_NODE, &debug_pimv6_trace_cmd); install_element(CONFIG_NODE, &debug_pimv6_trace_detail_cmd); + install_element(CONFIG_NODE, &debug_pimv6_zebra_cmd); } diff --git a/pimd/pim6_cmd.h b/pimd/pim6_cmd.h index 1615bc01be..8fb82d9f26 100644 --- a/pimd/pim6_cmd.h +++ b/pimd/pim6_cmd.h @@ -56,6 +56,7 @@ #define DEBUG_PIMV6_PACKETDUMP_SEND_STR "Dump sent packets\n" #define DEBUG_PIMV6_PACKETDUMP_RECV_STR "Dump received packets\n" #define DEBUG_PIMV6_TRACE_STR "PIMv6 internal daemon activity\n" +#define DEBUG_PIMV6_ZEBRA_STR "ZEBRA protocol activity\n" void pim_cmd_init(void); diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 778dd92ed0..2d6ce24381 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -5707,26 +5707,18 @@ DEFUN (no_debug_ssmpingd, return CMD_SUCCESS; } -DEFUN (debug_pim_zebra, +DEFPY (debug_pim_zebra, debug_pim_zebra_cmd, - "debug pim zebra", - DEBUG_STR - DEBUG_PIM_STR - DEBUG_PIM_ZEBRA_STR) -{ - PIM_DO_DEBUG_ZEBRA; - return CMD_SUCCESS; -} - -DEFUN (no_debug_pim_zebra, - no_debug_pim_zebra_cmd, - "no debug pim zebra", + "[no] debug pim zebra", NO_STR DEBUG_STR DEBUG_PIM_STR DEBUG_PIM_ZEBRA_STR) { - PIM_DONT_DEBUG_ZEBRA; + if (!no) + PIM_DO_DEBUG_ZEBRA; + else + PIM_DONT_DEBUG_ZEBRA; return CMD_SUCCESS; } @@ -7763,7 +7755,6 @@ void pim_cmd_init(void) install_element(ENABLE_NODE, &debug_ssmpingd_cmd); install_element(ENABLE_NODE, &no_debug_ssmpingd_cmd); install_element(ENABLE_NODE, &debug_pim_zebra_cmd); - install_element(ENABLE_NODE, &no_debug_pim_zebra_cmd); install_element(ENABLE_NODE, &debug_pim_mlag_cmd); install_element(ENABLE_NODE, &no_debug_pim_mlag_cmd); install_element(ENABLE_NODE, &debug_pim_vxlan_cmd); @@ -7809,7 +7800,6 @@ void pim_cmd_init(void) install_element(CONFIG_NODE, &debug_ssmpingd_cmd); install_element(CONFIG_NODE, &no_debug_ssmpingd_cmd); install_element(CONFIG_NODE, &debug_pim_zebra_cmd); - install_element(CONFIG_NODE, &no_debug_pim_zebra_cmd); install_element(CONFIG_NODE, &debug_pim_mlag_cmd); install_element(CONFIG_NODE, &no_debug_pim_mlag_cmd); install_element(CONFIG_NODE, &debug_pim_vxlan_cmd);