From ae5bcac0aee80d99d2fd2adba75733d86d36226f Mon Sep 17 00:00:00 2001 From: Sarita Patra Date: Tue, 18 Oct 2022 16:27:14 -0700 Subject: [PATCH] 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 --- pimd/pim_nht.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index ac8445e4ff..d164e7ed81 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -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++; } -- 2.39.5