diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2024-10-08 09:32:37 +0200 |
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2024-10-28 16:40:33 +0100 |
| commit | a7fec9c387bd9696444b111fd8b0c631ecbf7522 (patch) | |
| tree | a0197ab4effab0a792b9eedd50b063d4579ba78a /zebra/debug.c | |
| parent | 1668f3262a21b9990bbf3913742c58a62596c757 (diff) | |
zebra: add 'debug zebra srv6' command
Add a specific debug command to handle srv6 troubleshooting.
Move the srv6 traces that initially were under 'debug zebra packet'
debug.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/debug.c')
| -rw-r--r-- | zebra/debug.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/zebra/debug.c b/zebra/debug.c index cf1701be19..7b6a19fa1d 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -29,6 +29,7 @@ unsigned long zebra_debug_evpn_mh; unsigned long zebra_debug_pbr; unsigned long zebra_debug_neigh; unsigned long zebra_debug_tc; +unsigned long zebra_debug_srv6; DEFINE_HOOK(zebra_debug_show_debugging, (struct vty *vty), (vty)); @@ -121,6 +122,9 @@ DEFUN_NOSH (show_debugging_zebra, if (IS_ZEBRA_DEBUG_PBR) vty_out(vty, " Zebra PBR debugging is on\n"); + if (IS_ZEBRA_DEBUG_SRV6) + vty_out(vty, " Zebra SRv6 is on\n"); + hook_call(zebra_debug_show_debugging, vty); cmd_show_lib_debugs(vty); @@ -372,6 +376,21 @@ DEFUN (debug_zebra_tc, return CMD_SUCCESS; } +DEFPY(debug_zebra_srv6, + debug_zebra_srv6_cmd, + "[no$no] debug zebra srv6", + NO_STR + DEBUG_STR + "Zebra configuration\n" + "Debug zebra SRv6 events\n") +{ + if (no) + UNSET_FLAG(zebra_debug_srv6, ZEBRA_DEBUG_SRV6); + else + SET_FLAG(zebra_debug_srv6, ZEBRA_DEBUG_SRV6); + return CMD_SUCCESS; +} + DEFPY (debug_zebra_mlag, debug_zebra_mlag_cmd, "[no$no] debug zebra mlag", @@ -754,6 +773,11 @@ static int config_write_debug(struct vty *vty) write++; } + if (IS_ZEBRA_DEBUG_SRV6) { + vty_out(vty, "debug zebra srv6\n"); + write++; + } + return write; } @@ -793,6 +817,7 @@ void zebra_debug_init(void) install_element(ENABLE_NODE, &debug_zebra_rib_cmd); install_element(ENABLE_NODE, &debug_zebra_fpm_cmd); install_element(ENABLE_NODE, &debug_zebra_dplane_cmd); + install_element(ENABLE_NODE, &debug_zebra_srv6_cmd); install_element(ENABLE_NODE, &debug_zebra_mlag_cmd); install_element(ENABLE_NODE, &debug_zebra_nexthop_cmd); install_element(ENABLE_NODE, &debug_zebra_pbr_cmd); @@ -845,6 +870,7 @@ void zebra_debug_init(void) install_element(CONFIG_NODE, &no_debug_zebra_fpm_cmd); install_element(CONFIG_NODE, &no_debug_zebra_dplane_cmd); install_element(CONFIG_NODE, &no_debug_zebra_pbr_cmd); + install_element(CONFIG_NODE, &debug_zebra_srv6_cmd); install_element(CONFIG_NODE, &debug_zebra_mlag_cmd); install_element(CONFIG_NODE, &debug_zebra_evpn_mh_cmd); |
