diff --git a/babeld/babel_zebra.c b/babeld/babel_zebra.c index d0da93e507..daaa870a64 100644 --- a/babeld/babel_zebra.c +++ b/babeld/babel_zebra.c @@ -225,6 +225,8 @@ DEFUN_NOSH (show_debugging_babel, debug_babel_config_write(vty); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/bfdd/bfdd_vty.c b/bfdd/bfdd_vty.c index 21429f06cf..4a2c5bf662 100644 --- a/bfdd/bfdd_vty.c +++ b/bfdd/bfdd_vty.c @@ -973,6 +973,8 @@ DEFUN_NOSH(show_debugging_bfd, if (bglobal.debug_network) vty_out(vty, " Network layer debugging is on.\n"); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index df7262be64..264dd85fbc 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -2278,6 +2278,8 @@ DEFUN_NOSH (show_debugging_bgp, vty_out(vty, " BGP conditional advertisement debugging is on\n"); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c index e1ad51a9db..b0d34f55e6 100644 --- a/eigrpd/eigrp_dump.c +++ b/eigrpd/eigrp_dump.c @@ -322,6 +322,7 @@ DEFUN_NOSH (show_debugging_eigrp, } } + cmd_show_lib_debugs(vty); return CMD_SUCCESS; } diff --git a/isisd/isisd.c b/isisd/isisd.c index 54e6be5970..0ff31df0f8 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -1700,6 +1700,8 @@ DEFUN_NOSH (show_debugging, if (IS_DEBUG_LFA) print_debug(vty, DEBUG_LFA, 1); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/ldpd/ldp_vty_cmds.c b/ldpd/ldp_vty_cmds.c index 11d6930f06..3795cdaf38 100644 --- a/ldpd/ldp_vty_cmds.c +++ b/ldpd/ldp_vty_cmds.c @@ -774,7 +774,11 @@ DEFPY_NOSH (ldp_show_debugging_mpls_ldp, "MPLS information\n" "Label Distribution Protocol\n") { - return (ldp_vty_show_debugging(vty)); + ldp_vty_show_debugging(vty); + + cmd_show_lib_debugs(vty); + + return CMD_SUCCESS; } static void diff --git a/lib/command.c b/lib/command.c index a23afb1e43..7e171cb309 100644 --- a/lib/command.c +++ b/lib/command.c @@ -48,6 +48,7 @@ #include "lib_errors.h" #include "northbound_cli.h" #include "network.h" +#include "routemap.h" #include "frrscript.h" @@ -2446,6 +2447,11 @@ const char *host_config_get(void) return host.config; } +void cmd_show_lib_debugs(struct vty *vty) +{ + route_map_show_debug(vty); +} + void install_default(enum node_type node) { _install_element(node, &config_exit_cmd); diff --git a/lib/command.h b/lib/command.h index 70e52708a7..ca49efd262 100644 --- a/lib/command.h +++ b/lib/command.h @@ -649,6 +649,12 @@ extern char *cmd_variable_comp2str(vector comps, unsigned short cols); extern void command_setup_early_logging(const char *dest, const char *level); +/* + * Allow a mechanism for `debug XXX` commands that live + * under the lib directory to output their debug status + */ +extern void cmd_show_lib_debugs(struct vty *vty); + #ifdef __cplusplus } #endif diff --git a/lib/routemap.c b/lib/routemap.c index 3cc010c148..3a92799991 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -3174,6 +3174,12 @@ static struct cmd_node rmap_debug_node = { .config_write = rmap_config_write_debug, }; +void route_map_show_debug(struct vty *vty) +{ + if (rmap_debug) + vty_out(vty, "debug route-map\n"); +} + /* Configuration write function. */ static int rmap_config_write_debug(struct vty *vty) { diff --git a/lib/routemap.h b/lib/routemap.h index a365925854..c2e9de6cfb 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -1015,6 +1015,8 @@ extern void route_map_optimization_disabled_show(struct vty *vty, bool show_defaults); extern void route_map_cli_init(void); +extern void route_map_show_debug(struct vty *vty); + #ifdef __cplusplus } #endif diff --git a/nhrpd/nhrp_vty.c b/nhrpd/nhrp_vty.c index 3a8baa2342..53ba9eb12f 100644 --- a/nhrpd/nhrp_vty.c +++ b/nhrpd/nhrp_vty.c @@ -126,6 +126,8 @@ DEFUN_NOSH(show_debugging_nhrp, show_debugging_nhrp_cmd, debug_flags_desc[i].str); } + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index a16f4f73eb..fe742b912f 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -115,6 +115,8 @@ DEFUN_NOSH (show_debugging_ospf6, config_write_ospf6_debug(vty); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index 258a93fb16..9f2eab6d66 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -1860,7 +1860,11 @@ DEFUN_NOSH (show_debugging_ospf, DEBUG_STR OSPF_STR) { - return show_debugging_ospf_common(vty); + show_debugging_ospf_common(vty); + + cmd_show_lib_debugs(vty); + + return CMD_SUCCESS; } DEFUN_NOSH (show_debugging_ospf_instance, @@ -1878,7 +1882,11 @@ DEFUN_NOSH (show_debugging_ospf_instance, if (instance != ospf_instance) return CMD_NOT_MY_INSTANCE; - return show_debugging_ospf_common(vty); + show_debugging_ospf_common(vty); + + cmd_show_lib_debugs(vty); + + return CMD_SUCCESS; } static int config_write_debug(struct vty *vty); diff --git a/pathd/path_cli.c b/pathd/path_cli.c index 4775aa36fb..13e52ac86b 100644 --- a/pathd/path_cli.c +++ b/pathd/path_cli.c @@ -1092,6 +1092,8 @@ DEFPY_NOSH(show_debugging_pathd, show_debugging_pathd_cmd, "State of each debugging option\n" "pathd module debugging\n") { + + cmd_show_lib_debugs(vty); /* nothing to do here */ return CMD_SUCCESS; } diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index a2b3431b94..6f53adb334 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -1243,6 +1243,8 @@ DEFUN_NOSH(show_debugging_pbr, pbr_debug_config_write_helper(vty, false); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c index 49248798bf..f6b370cee3 100644 --- a/pimd/pim6_cmd.c +++ b/pimd/pim6_cmd.c @@ -1558,6 +1558,8 @@ DEFUN_NOSH (show_debugging_pimv6, pim_debug_config_write(vty); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index c2f7396c18..f26667245c 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -4906,6 +4906,7 @@ DEFUN_NOSH (show_debugging_pim, pim_debug_config_write(vty); + cmd_show_lib_debugs(vty); return CMD_SUCCESS; } diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c index 871ee8e87e..ded62812a7 100644 --- a/ripd/rip_debug.c +++ b/ripd/rip_debug.c @@ -55,6 +55,8 @@ DEFUN_NOSH (show_debugging_rip, if (IS_RIP_DEBUG_ZEBRA) vty_out(vty, " RIP zebra debugging is on\n"); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c index 539c01b3ec..d36327cb76 100644 --- a/ripngd/ripng_debug.c +++ b/ripngd/ripng_debug.c @@ -56,6 +56,8 @@ DEFUN_NOSH (show_debugging_ripng, if (IS_RIPNG_DEBUG_ZEBRA) vty_out(vty, " RIPng zebra debugging is on\n"); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c index 3853df7cb0..9b900fccd2 100644 --- a/sharpd/sharp_vty.c +++ b/sharpd/sharp_vty.c @@ -615,6 +615,8 @@ DEFUN_NOSH (show_debugging_sharpd, { vty_out(vty, "Sharp debugging status:\n"); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/staticd/static_vty.c b/staticd/static_vty.c index c0ace0e258..c0638f4bc4 100644 --- a/staticd/static_vty.c +++ b/staticd/static_vty.c @@ -1301,6 +1301,8 @@ DEFUN_NOSH (show_debugging_static, static_debug_status_write(vty); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/vrrpd/vrrp_vty.c b/vrrpd/vrrp_vty.c index 634a55dbc3..d2f25f2d40 100644 --- a/vrrpd/vrrp_vty.c +++ b/vrrpd/vrrp_vty.c @@ -710,6 +710,8 @@ DEFUN_NOSH (show_debugging_vrrp, vrrp_debug_status_write(vty); + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/watchfrr/watchfrr_vty.c b/watchfrr/watchfrr_vty.c index 1492ee37b6..e5cc437542 100644 --- a/watchfrr/watchfrr_vty.c +++ b/watchfrr/watchfrr_vty.c @@ -125,6 +125,8 @@ DEFUN_NOSH (show_debugging_watchfrr, DEBUG_STR WATCHFRR_STR) { + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; } diff --git a/zebra/debug.c b/zebra/debug.c index 69aaed33ac..25102145d7 100644 --- a/zebra/debug.c +++ b/zebra/debug.c @@ -137,6 +137,9 @@ DEFUN_NOSH (show_debugging_zebra, vty_out(vty, " Zebra PBR debugging is on\n"); hook_call(zebra_debug_show_debugging, vty); + + cmd_show_lib_debugs(vty); + return CMD_SUCCESS; }