summaryrefslogtreecommitdiff
path: root/pimd/pim_instance.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-05-23 07:43:47 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-07-24 13:51:38 -0400
commitb4575b3aa07a8273a6a4a2b6d7b7fe7ac75e7364 (patch)
tree999b0a5fecd563c7bbdaf5a258f278edc2eedb74 /pimd/pim_instance.c
parentf02d59db8b553849d415610868bba70a32769aba (diff)
pimd: Fix instance startup to separate data structure setup from use
Fix the instance startup to allow separation between the data structure setup for pim instances from actual attempt to use. More than likely there will be other issues that need to be fixed but this gets us 'working' again. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_instance.c')
-rw-r--r--pimd/pim_instance.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/pimd/pim_instance.c b/pimd/pim_instance.c
index d493657917..0849e6f748 100644
--- a/pimd/pim_instance.c
+++ b/pimd/pim_instance.c
@@ -107,8 +107,6 @@ static struct pim_instance *pim_instance_init(struct vrf *vrf)
if (vrf->vrf_id == VRF_DEFAULT)
pimg = pim;
- pim_mroute_socket_enable(pim);
-
pim_rp_init(pim);
pim_oil_init(pim);
@@ -161,16 +159,17 @@ static int pim_vrf_delete(struct vrf *vrf)
return 0;
}
+/*
+ * Code to turn on the pim instance that
+ * we have created with new
+ */
static int pim_vrf_enable(struct vrf *vrf)
{
- // struct pim_instance *pim;
+ struct pim_instance *pim = (struct pim_instance *)vrf->info;
zlog_debug("%s: for %s", __PRETTY_FUNCTION__, vrf->name);
- // vrf->info = (void *)pim;
-
- // if (vrf->vrf_id == VRF_DEFAULT)
- // pimg = pim;
+ pim_mroute_socket_enable(pim);
return 0;
}