]> git.proxmox.com Git - mirror_frr.git/commitdiff
Fix vtysh based "write term" output.
authorChris Caputo <ccaputo@alt.net>
Tue, 23 Jun 2009 05:55:57 +0000 (05:55 +0000)
committerPaul Jakma <paul@quagga.net>
Tue, 23 Jun 2009 13:23:26 +0000 (14:23 +0100)
* 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 <ccaputo@alt.net>
vtysh/vtysh.c
vtysh/vtysh_config.c

index bff06323bbc75ca6fe99dcee2a4526e422d8d5b6..3f189adbe57dc013327f3fcb96f8fd6d74675e13 100644 (file)
@@ -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;
 }
 
index 70c37462fddd21a8bf6280e8b20185eb6d547fa4..fb8a12690ab3acd863d5e18e3d7d9a2c763e4165 100644 (file)
@@ -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