]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Fix assert in node_parent()
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 17 Mar 2016 20:12:55 +0000 (16:12 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 17 Mar 2016 20:12:55 +0000 (16:12 -0400)
With this sequence of commands in a conf file:
router bgp X
address-family ipv4
exit
address-family ipv6
exit

When the bgp AS # is currently configured as !X and the
'vtysh -b -f <conf file above>' command run, vtysh will
crash with an assert.

This commit fixes that issue.

Ticket: CM-9852
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
lib/command.c

index 16f53da3ab0b4c1024e1e66b55d8efc35050b0af..05fc9b9e27f96312c205bcb5ee8edc23a0c17ef1 100644 (file)
@@ -2819,7 +2819,7 @@ command_config_read_one_line (struct vty *vty, struct cmd_element **cmd, int use
            !(!use_daemon && ret == CMD_ERR_NOTHING_TODO) &&
           ret != CMD_SUCCESS &&
            ret != CMD_WARNING &&
-           vty->node != CONFIG_NODE) {
+           vty->node > CONFIG_NODE) {
       vty->node = node_parent(vty->node);
       ret = cmd_execute_command_strict (vline, vty, cmd);
     }