diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 17e9c3f2683e..4fd19b5dbe13 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -960,8 +960,9 @@ void pim_rp_setup(struct pim_instance *pim) if (!pim_nht_lookup_ecmp(pim, &rp_info->rp.source_nexthop, nht_p, &rp_info->group, true)) { if (PIM_DEBUG_PIM_NHT_RP) - zlog_debug( - "Unable to lookup nexthop for rp specified"); + zlog_debug("%s: unable to lookup nexthop for rp %pPA", __func__, + &rp_info->rp.rpf_addr); + pim_nht_rp_del(rp_info); } } @@ -1107,7 +1108,12 @@ struct pim_rpf *pim_rp_g(struct pim_instance *pim, pim_addr group) __func__, &nht_p, &rp_info->group); pim_nht_find_or_track(pim, nht_p, NULL, rp_info, NULL); pim_rpf_set_refresh_time(pim); - pim_nht_lookup_ecmp(pim, &rp_info->rp.source_nexthop, nht_p, &rp_info->group, true); + if (!pim_nht_lookup_ecmp(pim, &rp_info->rp.source_nexthop, nht_p, &rp_info->group, + true)) + if (PIM_DEBUG_PIM_NHT_RP) + zlog_debug("%s: unable to lookup nexthop for rp %pPA", __func__, + &rp_info->rp.rpf_addr); + return (&rp_info->rp); } diff --git a/pimd/pim_tib.c b/pimd/pim_tib.c index e9992691a55e..d067abf45a8a 100644 --- a/pimd/pim_tib.c +++ b/pimd/pim_tib.c @@ -35,7 +35,11 @@ tib_sg_oil_setup(struct pim_instance *pim, pim_sgaddr sg, struct interface *oif) up = pim_upstream_find(pim, &sg); if (up) { memcpy(&nexthop, &up->rpf.source_nexthop, sizeof(struct pim_nexthop)); - pim_nht_lookup_ecmp(pim, &nexthop, vif_source, &grp, false); + if (!pim_nht_lookup_ecmp(pim, &nexthop, vif_source, &grp, false)) + if (PIM_DEBUG_PIM_NHT_RP) + zlog_debug("%s: Nexthop Lookup failed vif_src:%pPA, sg.src:%pPA, sg.grp:%pPA", + __func__, &vif_source, &sg.src, &sg.grp); + if (nexthop.interface) input_iface_vif_index = pim_if_find_vifindex_by_ifindex( pim, nexthop.interface->ifindex);