pimd: Allow PIM to start writing vrf information if it has it

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-05-22 08:27:24 -04:00
parent ef434d3e39
commit a01538df21

View 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)