summaryrefslogtreecommitdiffstats
path: root/pbrd
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-06-21 17:04:46 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-06-21 17:04:46 +0200
commitf5eef2d5a8a471fe6e4ec4f6acfa3dbf190eda5d (patch)
tree58ed00dffe8ba1f1c64ca0b6dfa3153da9ec6e43 /pbrd
parentMerge pull request #8841 from volta-networks/fix_ospf6_bad_seqnum (diff)
downloadfrr-f5eef2d5a8a471fe6e4ec4f6acfa3dbf190eda5d.tar.xz
frr-f5eef2d5a8a471fe6e4ec4f6acfa3dbf190eda5d.zip
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>
Diffstat (limited to 'pbrd')
-rw-r--r--pbrd/pbr_main.c1
-rw-r--r--pbrd/pbr_vty.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/pbrd/pbr_main.c b/pbrd/pbr_main.c
index 1badaf95b..786155903 100644
--- a/pbrd/pbr_main.c
+++ b/pbrd/pbr_main.c
@@ -119,6 +119,7 @@ struct quagga_signal_t pbr_signals[] = {
static const struct frr_yang_module_info *const pbrd_yang_modules[] = {
&frr_filter_info,
&frr_interface_info,
+ &frr_vrf_info,
};
FRR_DAEMON_INFO(pbrd, PBR, .vty_port = PBR_VTY_PORT,
diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c
index 216834fe0..3d56fc3da 100644
--- a/pbrd/pbr_vty.c
+++ b/pbrd/pbr_vty.c
@@ -1143,10 +1143,14 @@ static const struct cmd_variable_handler pbr_map_name[] = {
}
};
+extern struct zebra_privs_t pbr_privs;
+
void pbr_vty_init(void)
{
cmd_variable_handler_register(pbr_map_name);
+ vrf_cmd_init(NULL, &pbr_privs);
+
install_node(&interface_node);
if_cmd_init();