From 6e79f8bba438823d84b7464a9acc1e6fc9126a27 Mon Sep 17 00:00:00 2001 From: Chris Caputo Date: Tue, 23 Jun 2009 05:55:57 +0000 Subject: Fix vtysh based "write term" output. * vtysh/vtysh.c: "end" should be printed at the bottom, not the top. * vtysh/vtysh_config.c: PROTOCOL_NODE was not being handled, and thus was being displayed at the top of a config, rather than in its rightful place near the bottom. Signed-off-by: Chris Caputo --- vtysh/vtysh.c | 4 ++-- vtysh/vtysh_config.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'vtysh') diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index bff06323..3f189adb 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1722,8 +1722,6 @@ DEFUN (vtysh_write_terminal, vtysh_config_dump (fp); - vty_out (vty, "end%s", VTY_NEWLINE); - if (vtysh_pager_name && fp) { fflush (fp); @@ -1735,6 +1733,8 @@ DEFUN (vtysh_write_terminal, fp = NULL; } + vty_out (vty, "end%s", VTY_NEWLINE); + return CMD_SUCCESS; } diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index 70c37462..fb8a1269 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -244,6 +244,8 @@ vtysh_config_parse_line (const char *line) || strncmp (line, "enable password", strlen ("enable password")) == 0) config = config_get (AAA_NODE, line); + else if (strncmp (line, "ip protocol", strlen ("ip protocol")) == 0) + config = config_get (PROTOCOL_NODE, line); else { if (strncmp (line, "log", strlen ("log")) == 0 -- cgit v1.2.1