summaryrefslogtreecommitdiff
path: root/pimd/pimd.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-04-05 12:49:17 -0400
committerGitHub <noreply@github.com>2017-04-05 12:49:17 -0400
commit096398104b4c223d7f6a90cae632a1b418799517 (patch)
tree73715073a44921ecdb95ab3f4ecd811f60b62d57 /pimd/pimd.c
parent2aaa554de9535e9299519d82b11f55f12c808975 (diff)
parent6492ed5369a7bd833e8add952af35a3c9d7f2528 (diff)
Merge branch 'master' into pim_5549
Diffstat (limited to 'pimd/pimd.c')
-rw-r--r--pimd/pimd.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/pimd/pimd.c b/pimd/pimd.c
index e76e202bd3..3d3f4d6aee 100644
--- a/pimd/pimd.c
+++ b/pimd/pimd.c
@@ -108,10 +108,17 @@ pim_vrf_enable (struct vrf *vrf)
{
pimg = pim_instance_init (VRF_DEFAULT, AFI_IP);
if (pimg == NULL)
- zlog_err ("%s %s: pim class init failure ", __FILE__,
- __PRETTY_FUNCTION__);
+ {
+ zlog_err ("%s %s: pim class init failure ", __FILE__,
+ __PRETTY_FUNCTION__);
+ /*
+ * We will crash and burn otherwise
+ */
+ exit(1);
+ }
+
+ pimg->send_v6_secondary = 1;
- pimg->send_v6_secondary = 1;
}
return 0;
}
@@ -196,12 +203,18 @@ static void
pim_instance_terminate (void)
{
/* Traverse and cleanup rpf_hash */
- if (pimg && pimg->rpf_hash)
+ if (pimg->rpf_hash)
{
hash_clean (pimg->rpf_hash, (void *) pim_rp_list_hash_clean);
hash_free (pimg->rpf_hash);
+ pimg->rpf_hash = NULL;
+ }
+
+ if (pimg->ssm_info)
+ {
+ pim_ssm_terminate (pimg->ssm_info);
+ pimg->ssm_info = NULL;
}
- pim_ssm_terminate (pimg->ssm_info);
XFREE (MTYPE_PIM_PIM_INSTANCE, pimg);
}