Skip to content

Commit

Permalink
Merge pull request #11720 from SaiGomathiN/pimv6debugfix
Browse files Browse the repository at this point in the history
pim6d: Add 'show debugging [pimv6]' CLI and some fixes
  • Loading branch information
ton31337 committed Aug 8, 2022
2 parents 56f1bea + 614b77f commit 8e2eb59
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions pimd/pim6_cmd.c
Expand Up @@ -1516,6 +1516,20 @@ DEFPY (debug_pimv6_zebra,
return CMD_SUCCESS;
}

DEFUN_NOSH (show_debugging_pimv6,
show_debugging_pimv6_cmd,
"show debugging [pimv6]",
SHOW_STR
DEBUG_STR
"PIMv6 Information\n")
{
vty_out(vty, "PIMv6 debugging status\n");

pim_debug_config_write(vty);

return CMD_SUCCESS;
}

void pim_cmd_init(void)
{
if_cmd_init(pim_interface_config_write);
Expand Down Expand Up @@ -1634,6 +1648,8 @@ void pim_cmd_init(void)
install_element(ENABLE_NODE, &clear_ipv6_pim_interfaces_cmd);
install_element(ENABLE_NODE, &clear_ipv6_pim_interface_traffic_cmd);

install_element(ENABLE_NODE, &show_debugging_pimv6_cmd);

install_element(ENABLE_NODE, &debug_pimv6_cmd);
install_element(ENABLE_NODE, &debug_pimv6_nht_cmd);
install_element(ENABLE_NODE, &debug_pimv6_nht_det_cmd);
Expand Down
2 changes: 0 additions & 2 deletions pimd/pim6_main.c
Expand Up @@ -161,8 +161,6 @@ int main(int argc, char **argv, char **envp)
}

pim_router_init();
/* TODO PIM6: temporary enable all debugs, remove later in PIMv6 work */
router->debugs = ~0U;

access_list_init();
prefix_list_init();
Expand Down
2 changes: 2 additions & 0 deletions pimd/pim_cmd_common.c
Expand Up @@ -4114,6 +4114,8 @@ int pim_no_debug_pim_cmd(void)

PIM_DONT_DEBUG_PIM_PACKETDUMP_SEND;
PIM_DONT_DEBUG_PIM_PACKETDUMP_RECV;
PIM_DONT_DEBUG_BSM;
PIM_DONT_DEBUG_VXLAN;
return CMD_SUCCESS;
}

Expand Down
4 changes: 2 additions & 2 deletions pimd/pim_vty.c
Expand Up @@ -129,12 +129,12 @@ int pim_debug_config_write(struct vty *vty)
}

if (PIM_DEBUG_BSM) {
vty_out(vty, "debug pim bsm\n");
vty_out(vty, "debug " PIM_AF_DBG " bsm\n");
++writes;
}

if (PIM_DEBUG_VXLAN) {
vty_out(vty, "debug pim vxlan\n");
vty_out(vty, "debug " PIM_AF_DBG " vxlan\n");
++writes;
}

Expand Down

0 comments on commit 8e2eb59

Please sign in to comment.