+2005-01-17 Hasso Tepper <hasso at quagga.net>
+
+ * 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).
+
2005-01-14 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* command.c (print_version): Do not bother even to examine host.name,
/*
- $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
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;
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 )
char **cmd_complete_command ();
const char *cmd_prompt (enum node_type);
int config_from_file (struct vty *, FILE *);
-int cmd_execute_command (vector, struct vty *, struct cmd_element **);
+int cmd_execute_command (vector, struct vty *, struct cmd_element **, int);
int cmd_execute_command_strict (vector, struct vty *, struct cmd_element **);
void config_replace_string (struct cmd_element *, char *, ...);
void cmd_init (int);
if (vline == NULL)
return CMD_SUCCESS;
- ret = cmd_execute_command (vline, vty, NULL);
+ ret = cmd_execute_command (vline, vty, NULL, 0);
if (ret != CMD_SUCCESS)
switch (ret)
+2005-01-10 Hasso Tepper <hasso at quagga.net>
+
+ * 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.
+
2004-12-22 Hasso Tepper <hasso at quagga.net>
* vtysh_config.c: No delimiter between "ip forwarding" and "ipv6
if (vline == NULL)
return;
- ret = cmd_execute_command (vline, vty, &cmd);
+ ret = cmd_execute_command (vline, vty, &cmd, 1);
cmd_free_strvec (vline);
return;
}
- ret = cmd_execute_command (vline, vty, &cmd);
+ ret = cmd_execute_command (vline, vty, &cmd, 1);
cmd_free_strvec (vline);
if (ret != CMD_SUCCESS_DAEMON)
break;