]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Allow PIM to start writing vrf information if it has it
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 22 May 2017 12:27:24 +0000 (08:27 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 24 Jul 2017 17:51:37 +0000 (13:51 -0400)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_instance.c

index 5892b5c2e3630690a1d85361a97ad1d71ec90384..3d13ee7a574de9b6749f23d5b2658d41d52ef5a1 100644 (file)
@@ -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)