pimd, pim6d: Fix RP Unknown IIF

When route to RP is having nexthop secndary address,
neighborship is built with primary address,
then pim_neighbor_find() fails, which causes RP IIF
Unknown.

Fix:
Verify pim neighborship on the RP connected interface.

Issue: #11526

Signed-off-by: Sarita Patra <saritap@vmware.com>
This commit is contained in:
Sarita Patra 2022-10-18 16:27:14 -07:00
parent 2c6a32f9be
commit ae5bcac0ae

View File

@ -561,7 +561,7 @@ static int pim_ecmp_nexthop_search(struct pim_instance *pim,
src)) {
nbr = pim_neighbor_find(
nexthop->interface,
nexthop->mrib_nexthop_addr);
nexthop->mrib_nexthop_addr, true);
if (!nbr
&& !if_is_loopback(nexthop->interface)) {
if (PIM_DEBUG_PIM_NHT)
@ -603,7 +603,7 @@ static int pim_ecmp_nexthop_search(struct pim_instance *pim,
#else
pim_addr nhaddr = nh_node->gate.ipv6;
#endif
nbrs[i] = pim_neighbor_find(ifps[i], nhaddr);
nbrs[i] = pim_neighbor_find(ifps[i], nhaddr, true);
if (nbrs[i] || pim_if_connected_to_source(ifps[i], src))
num_nbrs++;
}
@ -954,7 +954,8 @@ int pim_ecmp_nexthop_lookup(struct pim_instance *pim,
pim->vrf->vrf_id);
if (ifps[i]) {
nbrs[i] = pim_neighbor_find(
ifps[i], nexthop_tab[i].nexthop_addr);
ifps[i], nexthop_tab[i].nexthop_addr, true);
if (nbrs[i] || pim_if_connected_to_source(ifps[i], src))
num_nbrs++;
}