]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib, zebra: fix exit from link-params node
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 21 Jul 2021 14:23:45 +0000 (17:23 +0300)
committermergify-bot <noreply@mergify.io>
Fri, 23 Jul 2021 09:32:12 +0000 (09:32 +0000)
When exiting from link-params node, we must not decrement xpath_index
because it is not incremented when entering the node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit d9331fc67c3c68302930f64fada992512e18f7d2)

lib/command.c

index 248efbd174a1056ca42080a92c4c3e1e9655fc96..51c7b6fe57c0ded0765c3b0e690bbf48e9546efa 100644 (file)
@@ -160,6 +160,9 @@ static bool vty_check_node_for_xpath_decrement(enum node_type target_node,
                || node == BGP_FLOWSPECV6_NODE))
                return false;
 
+       if (target_node == INTERFACE_NODE && node == LINK_PARAMS_NODE)
+               return false;
+
        return true;
 }