From: Donald Sharp Date: Mon, 14 Aug 2017 23:06:39 +0000 (-0400) Subject: pimd: Ensure cleanup of S,G on ifchannel failure to create X-Git-Tag: frr-4.0-dev~407^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c6f94e1971fdbe90b371d4b3c64974b47791b7a4;p=mirror%2Ffrr.git 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 --- diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index c91efbd8b6..39f5f2cc4b 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -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);