dnode = yang_dnode_get(vty->candidate_config->dnode,
"%s/frr-isisd:isis", VTY_CURR_XPATH);
- if (dnode == NULL)
+ if (dnode == NULL) {
+ vty_out(vty, "ISIS is not enabled on this circuit\n");
return CMD_SUCCESS;
+ }
nb_cli_enqueue_change(vty, "./frr-isisd:isis/bfd-monitoring",
NB_OP_MODIFY, no ? "false" : "true");
void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
bool show_defaults)
{
- if (show_defaults == false)
- vty_out(vty, " %s" PROTO_NAME " bfd\n",
- yang_dnode_get_bool(dnode, NULL) ? "" : "no ");
- else
- vty_out(vty, " no " PROTO_NAME " bfd\n");
+ if (!yang_dnode_get_bool(dnode, NULL))
+ vty_out(vty, " no");
+
+ vty_out(vty, "isis bfd\n");
}
/*
bfd_monitoring = yang_dnode_get_bool(dnode, NULL);
if (bfd_monitoring) {
- /* Sanity check: BFD session is already registered. */
- if (circuit->bfd_info != NULL)
- return NB_OK;
-
isis_bfd_circuit_param_set(circuit, BFD_DEF_MIN_RX,
BFD_DEF_MIN_TX, BFD_DEF_DETECT_MULT,
true);
} else {
- /* Sanity check: no BFD session was registered. */
- if (circuit->bfd_info == NULL)
- return NB_OK;
-
isis_bfd_circuit_cmd(circuit, ZEBRA_BFD_DEST_DEREGISTER);
bfd_info_free(&circuit->bfd_info);
}