* command.[ch], vty.c: cmd_execute_command() function must not attempt
	  to walk up in the node tree if called from vtysh. Different daemons
	  might have commands with same syntax in different nodes (for example
	  "router-id x.x.x.x" commands in zebra/ospfd/ospf6d daemons).

	* vtysh.c: Reflect changes in lib. cmd_execute_command() should know
	  now that it's called from vtysh and must not attempt to walk up in
	  the node tree.

	[pullup candidate]
diff --git a/lib/command.c b/lib/command.c
index 92bbac7..8f9b98e 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1,5 +1,5 @@
 /*
-   $Id: command.c,v 1.33 2005/01/14 17:09:38 ajs Exp $
+   $Id: command.c,v 1.34 2005/01/16 23:31:54 hasso Exp $
 
    Command interpreter routine for virtual terminal [aka TeletYpe]
    Copyright (C) 1997, 98, 99 Kunihiro Ishiguro
@@ -2092,7 +2092,8 @@
 
 
 int
-cmd_execute_command (vector vline, struct vty *vty, struct cmd_element **cmd) {
+cmd_execute_command (vector vline, struct vty *vty, struct cmd_element **cmd,
+		     int vtysh) {
   int ret, saved_ret, tried = 0;
   enum node_type onode, try_node;
 
@@ -2123,6 +2124,9 @@
 
   saved_ret = ret = cmd_execute_command_real (vline, vty, cmd);
 
+  if (vtysh)
+    return saved_ret;
+
   /* This assumes all nodes above CONFIG_NODE are childs of CONFIG_NODE */
   while ( ret != CMD_SUCCESS && ret != CMD_WARNING 
 	  && vty->node > CONFIG_NODE )