]> git.proxmox.com Git - mirror_frr.git/commit
vtysh: mark exit-vrf with end when using vtysh -m
authorQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 18 Jul 2019 15:29:54 +0000 (15:29 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 18 Jul 2019 15:29:54 +0000 (15:29 +0000)
commit13f48fd6759cfdec35f17e37037e587cab5ec8e1
tree0a53e0b96c9b09100819a9c122d2ee9c5c294600
parenta04686849fdf2f8bc81049d51c40a45c492b1f7f
vtysh: mark exit-vrf with end when using vtysh -m

VRF context blocks have a context-specific exit command in order to
explicitly force an exit to the top level config node. This command
exists because 'ip route' commands are accepted in both VRF_NODE and
CONFIG_NODE, so static routes intended to be accepted in CONFIG_NODE
that immediately follow a VRF_NODE block will be shoved into the
VRF_NODE block unless the VRF context is explicitly exited.

However, because this is a command that exits to CONFIG_NODE, vtysh -m
should be printing an `end` at the end of the context, since
frr-reload.py relies on this context ender to know when it's back in
CONFIG_NODE. But since this is the only explicit context exit command
that also exits to CONFIG_NODE we don't really have a good way of doing
this already. Hence this god-awful patch.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
vtysh/vtysh.c