]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: fix bfd config output
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 6 May 2021 12:00:36 +0000 (15:00 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Fri, 7 May 2021 09:03:57 +0000 (12:03 +0300)
Don't show default BFD config ("no isis bfd") if show_enabled flag is not set.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
isisd/isis_cli.c

index 3013b2b44435ac7516b588b67130d4ba37c63cf6..14fa414c522b51edfdef2654a9d85e9a8d700d53 100644 (file)
@@ -393,10 +393,12 @@ DEFPY_YANG(isis_bfd_profile,
 void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
                                     bool show_defaults)
 {
-       if (!yang_dnode_get_bool(dnode, "./enabled"))
-               vty_out(vty, " no");
-
-       vty_out(vty, " isis bfd\n");
+       if (!yang_dnode_get_bool(dnode, "./enabled")) {
+               if (show_defaults)
+                       vty_out(vty, " no isis bfd\n");
+       } else {
+               vty_out(vty, " isis bfd\n");
+       }
 
        if (yang_dnode_exists(dnode, "./profile"))
                vty_out(vty, " isis bfd profile %s\n",