From ed52a4a3609a2d794d1284ae4ffcd00a9632615d Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Wed, 21 Jul 2021 17:23:45 +0300 Subject: [PATCH] lib, zebra: fix exit from link-params node 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 (cherry picked from commit d9331fc67c3c68302930f64fada992512e18f7d2) --- lib/command.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/command.c b/lib/command.c index 248efbd174..51c7b6fe57 100644 --- a/lib/command.c +++ b/lib/command.c @@ -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; } -- 2.39.5