]> git.proxmox.com Git - mirror_frr.git/commitdiff
vtysh: properly exit BFD_PEER_NODE when marking file
authorPaul Manley <paul.manley@wholefoods.com>
Thu, 9 Jul 2020 16:25:34 +0000 (11:25 -0500)
committerPaul Manley <paul.manley@wholefoods.com>
Thu, 9 Jul 2020 16:25:34 +0000 (11:25 -0500)
vtysh needs to be aware of how to properly exit a bfd peer when subsequent commands only succeed in a higher context.

https://github.com/FRRouting/frr/issues/6511#issuecomment-656166206

Signed-off-by: Paul Manley <paul.manley@wholefoods.com>
vtysh/vtysh.c

index 29e0842daf5cd5fc80886f519084348cedeaa970..9e5885c7b6b38133969cccd15d7524a5bff83ea5 100644 (file)
@@ -809,6 +809,9 @@ int vtysh_mark_file(const char *filename)
                        } else if ((prev_node == KEYCHAIN_KEY_NODE)
                                   && (tried == 1)) {
                                vty_out(vty, "exit\n");
+                       } else if ((prev_node == BFD_PEER_NODE)
+                                  && (tried == 1)) {
+                               vty_out(vty, "exit\n");
                        } else if (tried) {
                                vty_out(vty, "end\n");
                        }