summaryrefslogtreecommitdiff
path: root/ospfd/ospf_vty.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-06-21 18:04:46 +0300
committermergify-bot <noreply@mergify.io>2021-07-22 22:33:16 +0000
commit1173e8071ef5f5a1cf89ca06230bd1cfbe19e1b8 (patch)
tree272899c1c48f5b714197268824ca4b627b1b50bb /ospfd/ospf_vty.c
parent9931db75f7730381ad4fba16efd39cbb67749470 (diff)
lib: remove vrf-interface config when removing the VRF
If we have the following configuration: ``` vrf red smth exit-vrf ! interface red vrf red smth ``` And we delete the VRF using "no vrf red" command, we end up with: ``` interface red smth ``` Interface config is preserved but moved to the default VRF. This is not an expected behavior. We should remove the interface config when the VRF is deleted. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> (cherry picked from commit f5eef2d5a8a471fe6e4ec4f6acfa3dbf190eda5d)
Diffstat (limited to 'ospfd/ospf_vty.c')
-rw-r--r--ospfd/ospf_vty.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index cb64187d72..54ce248d89 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -12959,6 +12959,8 @@ void ospf_vty_init(void)
install_element(OSPF_NODE, &ospf_max_multipath_cmd);
install_element(OSPF_NODE, &no_ospf_max_multipath_cmd);
+ vrf_cmd_init(NULL, &ospfd_privs);
+
/* Init interface related vty commands. */
ospf_vty_if_init();