diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 9ee06edfc1..3f985e64b4 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -1232,6 +1232,16 @@ int pim_ifchannel_local_membership_add(struct interface *ifp, __FILE__, __func__, child->sg_str, ifp->name, up->sg_str); + if (!child->rpf.source_nexthop.interface) { + /* when iif unknown, do not inherit */ + if (PIM_DEBUG_EVENTS) + zlog_debug( + "Skipped (S,G)=%s(%s) from %s: no iif", + child->sg_str, ifp->name, + up->sg_str); + continue; + } + ch = pim_ifchannel_find(ifp, &child->sg); if (pim_upstream_evaluate_join_desired_interface( child, ch, starch)) { diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 56e1927528..3e3b6dddb5 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -139,11 +139,12 @@ void pim_rp_init(struct pim_instance *pim) void pim_rp_free(struct pim_instance *pim) { - if (pim->rp_list) - list_delete(&pim->rp_list); if (pim->rp_table) route_table_finish(pim->rp_table); pim->rp_table = NULL; + + if (pim->rp_list) + list_delete(&pim->rp_list); } /*