summaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-09-04 11:19:39 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-09-04 11:22:45 +0800
commit8304b1e3e9f942b33a684c5d1129159abd1a3efd (patch)
treebbcd8d1ad7ca50a4f4557eb627ddc852fc95a3a1 /src/vty
parentfa832012d041577f825fecbea08d4a62306e5b0e (diff)
vty: Everything <= CONFIG_NODE is not a child of config
The method should be renamed to is child of config node as it was comparing if vty->node > CONFIG_NODE. This is fixing an assert in go_to_parent as we tried to find a parent for the CONFIG_NODE.
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vty/command.c b/src/vty/command.c
index c55e1648..7525df65 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -141,9 +141,9 @@ static int cmp_desc(const void *p, const void *q)
static int is_config(struct vty *vty)
{
- if (vty->node < CONFIG_NODE)
+ if (vty->node <= CONFIG_NODE)
return 0;
- else if (vty->node >= CONFIG_NODE && vty->node < _LAST_OSMOVTY_NODE)
+ else if (vty->node > CONFIG_NODE && vty->node < _LAST_OSMOVTY_NODE)
return 1;
else if (host.app_info->is_config_node)
return host.app_info->is_config_node(vty, vty->node);