return strstr(VTY_CURR_XPATH, "/single-hop") != NULL;
}
+static bool
+bfd_cli_is_profile(struct vty *vty)
+{
+ return strstr(VTY_CURR_XPATH, "/bfd/profile") != NULL;
+}
+
/*
* Functions.
*/
NO_STR
"Configure echo mode\n")
{
- if (!bfd_cli_is_single_hop(vty)) {
+ if (!bfd_cli_is_profile(vty) && !bfd_cli_is_single_hop(vty)) {
vty_out(vty, "%% Echo mode is only available for single hop sessions.\n");
return CMD_WARNING_CONFIG_FAILED;
}
{
char value[32];
- if (!bfd_cli_is_single_hop(vty)) {
+ if (!bfd_cli_is_profile(vty) && !bfd_cli_is_single_hop(vty)) {
vty_out(vty, "%% Echo mode is only available for single hop sessions.\n");
return CMD_WARNING_CONFIG_FAILED;
}