From: Paul Manley Date: Thu, 9 Jul 2020 16:25:34 +0000 (-0500) Subject: vtysh: properly exit BFD_PEER_NODE when marking file X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=2604086c3d9face0aca2497a982782c865bb2b59;p=matthieu%2Ffrr.git vtysh: properly exit BFD_PEER_NODE when marking file 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 (cherry picked from commit b727c12aabf1afc2b6e33f8590c9786e349e4fcb) --- diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 15ec866fc9..4fdf68c0e6 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -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"); }