summaryrefslogtreecommitdiff
path: root/pathd/path_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'pathd/path_cli.c')
-rw-r--r--pathd/path_cli.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/pathd/path_cli.c b/pathd/path_cli.c
index e22931c13e..bf8a9ea028 100644
--- a/pathd/path_cli.c
+++ b/pathd/path_cli.c
@@ -131,7 +131,7 @@ DEFPY(show_srte_policy,
/* Dump the generated table. */
table = ttable_dump(tt, "\n");
vty_out(vty, "%s\n", table);
- XFREE(MTYPE_TMP, table);
+ XFREE(MTYPE_TMP_TTABLE, table);
ttable_del(tt);
@@ -1089,9 +1089,7 @@ DEFPY_NOSH(show_debugging_pathd, show_debugging_pathd_cmd,
vty_out(vty, "Path debugging status:\n");
cmd_show_lib_debugs(vty);
- /* nothing to do here */
- path_ted_show_debugging(vty);
- path_policy_show_debugging(vty);
+
return CMD_SUCCESS;
}
@@ -1101,10 +1099,8 @@ DEFPY(debug_path_policy, debug_path_policy_cmd, "[no] debug pathd policy",
"policy debugging\n")
{
uint32_t mode = DEBUG_NODE2MODE(vty->node);
- bool no_debug = no;
DEBUG_MODE_SET(&path_policy_debug, mode, !no);
- DEBUG_FLAGS_SET(&path_policy_debug, PATH_POLICY_DEBUG_BASIC, !no_debug);
return CMD_SUCCESS;
}
@@ -1307,33 +1303,9 @@ int config_write_segment_routing(struct vty *vty)
return 1;
}
-static int path_policy_cli_debug_config_write(struct vty *vty)
-{
- if (DEBUG_MODE_CHECK(&path_policy_debug, DEBUG_MODE_CONF)) {
- if (DEBUG_FLAGS_CHECK(&path_policy_debug,
- PATH_POLICY_DEBUG_BASIC))
- vty_out(vty, "debug pathd policy\n");
- return 1;
- }
- return 0;
-}
-
-static int path_policy_cli_debug_set_all(uint32_t flags, bool set)
-{
- DEBUG_FLAGS_SET(&path_policy_debug, flags, set);
-
- /* If all modes have been turned off, don't preserve options. */
- if (!DEBUG_MODE_CHECK(&path_policy_debug, DEBUG_MODE_ALL))
- DEBUG_CLEAR(&path_policy_debug);
-
- return 0;
-}
-
void path_cli_init(void)
{
- hook_register(nb_client_debug_config_write,
- path_policy_cli_debug_config_write);
- hook_register(nb_client_debug_set_all, path_policy_cli_debug_set_all);
+ debug_install(&path_policy_debug);
install_node(&segment_routing_node);
install_node(&sr_traffic_eng_node);