]> git.puffer.fish Git - matthieu/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)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 14 Jul 2020 16:44:40 +0000 (13:44 -0300)
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>
(cherry picked from commit b727c12aabf1afc2b6e33f8590c9786e349e4fcb)

vtysh/vtysh.c

index 15ec866fc91e95699f2f1f61b1dcbba8669d04a2..4fdf68c0e6df9bc1d9979dac6b744dc353e03c0d 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");
                        }