]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Ensure cleanup of S,G on ifchannel failure to create
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 14 Aug 2017 23:06:39 +0000 (19:06 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 15 Aug 2017 00:16:48 +0000 (20:16 -0400)
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>
pimd/pim_ifchannel.c

index c91efbd8b624e3e685df440262b2d3b85d8e7fe8..39f5f2cc4bfd2e83c3887c5801d0b72b8ff6fbe4 100644 (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);