summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-04-29 23:49:29 +0200
committerRenato Westphal <renato@opensourcerouting.org>2020-04-29 23:49:29 +0200
commit799a81df9d1c9abfc525fffd53983226fd5233c1 (patch)
treed8da70d0d11ef712c0c9d7980f6f6d5ac08ee528 /lib
parentMerge pull request #6314 from pjdruddy/fix-arp-cache-vtep-json-cli (diff)
downloadfrr-799a81df9d1c9abfc525fffd53983226fd5233c1.tar.xz
frr-799a81df9d1c9abfc525fffd53983226fd5233c1.zip
lib: update the CLI xpath index when exiting from the VRF node
All custom "exit-*" commands that exit from a YANG-modeled CLI node need to use cmd_exit() to ensure the CLI xpath index (vty->xpath_index) will be updated accordingly. Fixes #6316. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/vrf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vrf.c b/lib/vrf.c
index f8702973b..6bd577fce 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -726,7 +726,7 @@ DEFUN_NOSH(vrf_exit,
{
/* We have to set vrf context to default vrf */
VTY_PUSH_CONTEXT(VRF_NODE, vrf_get(VRF_DEFAULT, VRF_DEFAULT_NAME));
- vty->node = CONFIG_NODE;
+ cmd_exit(vty);
return CMD_SUCCESS;
}