pimd: Ensure cleanup of S,G on ifchannel failure to create

There exists a path for ifchannel creation that if a S,G
fails to create and a corresponding *,G ifchannel is there,
the S,G will be deleted but we were leaving the S,G in the
*,G ifchannel sources list.  Remove from the list in this case

Ticket: CM-17605
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-08-14 19:06:39 -04:00
parent 7e4f56d349
commit c6f94e1971

View File

@ -553,6 +553,9 @@ struct pim_ifchannel *pim_ifchannel_add(struct interface *ifp,
"%s: could not attach upstream (S,G)=%s on interface %s",
__PRETTY_FUNCTION__, pim_str_sg_dump(sg), ifp->name);
if (ch->parent)
listnode_delete(ch->parent->sources, ch);
pim_ifchannel_remove_children(ch);
if (ch->sources)
list_delete(ch->sources);