diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-06 12:56:32 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-08 08:37:53 -0500 |
| commit | fc9d070da4209c65cc65b56f9f936ab2d8e62e9c (patch) | |
| tree | fe411794bff1d828a5d87f7fe5357f33812d5456 /pimd/pim_jp_agg.c | |
| parent | 1a664f5e3685139651270263a6d65c868108264d (diff) | |
pimd: Fix various ifdown/ifup scenarios w/ J/P Agg
There exists situations where we may have cleaned not
properly cleaned up the various J/P aggregation lists.
This commit fixes those issues.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_jp_agg.c')
| -rw-r--r-- | pimd/pim_jp_agg.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/pimd/pim_jp_agg.c b/pimd/pim_jp_agg.c index ca9d62e633..3ffdbe2017 100644 --- a/pimd/pim_jp_agg.c +++ b/pimd/pim_jp_agg.c @@ -81,15 +81,27 @@ pim_jp_agg_src_cmp (void *arg1, void *arg2) return 0; } +/* + * This function is used by scan_oil to clear + * the created jp_agg_group created when + * figuring out where to send prunes + * and joins. + */ void pim_jp_agg_clear_group (struct list *group) { - struct listnode *node, *nnode; + struct listnode *gnode, *gnnode; + struct listnode *snode, *snnode; struct pim_jp_agg_group *jag; + struct pim_jp_sources *js; - for (ALL_LIST_ELEMENTS(group, node, nnode, jag)) + for (ALL_LIST_ELEMENTS(group, gnode, gnnode, jag)) { - list_delete(jag->sources); + for (ALL_LIST_ELEMENTS(jag->sources, snode, snnode, js)) + { + listnode_delete(jag->sources, js); + XFREE(MTYPE_PIM_JP_AGG_SOURCE, js); + } jag->sources = NULL; listnode_delete(group, jag); XFREE(MTYPE_PIM_JP_AGG_GROUP, jag); |
