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.
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);