summaryrefslogtreecommitdiff
path: root/pimd/pim_instance.c
diff options
context:
space:
mode:
Diffstat (limited to 'pimd/pim_instance.c')
-rw-r--r--pimd/pim_instance.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/pimd/pim_instance.c b/pimd/pim_instance.c
index 5892b5c2e3..3d13ee7a57 100644
--- a/pimd/pim_instance.c
+++ b/pimd/pim_instance.c
@@ -165,9 +165,28 @@ static int pim_vrf_disable(struct vrf *vrf)
return 0;
}
+static int pim_vrf_config_write(struct vty *vty)
+{
+ struct vrf *vrf;
+ struct pim_instance *pim;
+
+ RB_FOREACH(vrf, vrf_name_head, &vrfs_by_name)
+ {
+ pim = vrf->info;
+ if (!pim || !vrf->vrf_id != VRF_DEFAULT) {
+ vty_out(vty, "vrf %s\n", vrf->name);
+ vty_out(vty, "!\n");
+ }
+ }
+
+ return 0;
+}
+
void pim_vrf_init(void)
{
vrf_init(pim_vrf_new, pim_vrf_enable, pim_vrf_disable, pim_vrf_delete);
+
+ vrf_cmd_init(pim_vrf_config_write);
}
void pim_vrf_terminate(void)