diff options
Diffstat (limited to 'pimd/pim_nht.c')
-rw-r--r-- | pimd/pim_nht.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/pimd/pim_nht.c b/pimd/pim_nht.c index d73f366d4..d164e7ed8 100644 --- a/pimd/pim_nht.c +++ b/pimd/pim_nht.c @@ -307,12 +307,11 @@ bool pim_nht_bsr_rpf_check(struct pim_instance *pim, pim_addr bsr_addr, if (if_is_loopback(ifp) && if_is_loopback(src_ifp)) return true; - nbr = pim_neighbor_find(ifp, znh->nexthop_addr); + nbr = pim_neighbor_find(ifp, znh->nexthop_addr, true); if (!nbr) continue; - return znh->ifindex == src_ifp->ifindex && - (!pim_addr_cmp(znh->nexthop_addr, src_ip)); + return znh->ifindex == src_ifp->ifindex; } return false; } @@ -373,12 +372,13 @@ bool pim_nht_bsr_rpf_check(struct pim_instance *pim, pim_addr bsr_addr, return true; /* MRIB (IGP) may be pointing at a router where PIM is down */ - nbr = pim_neighbor_find(ifp, nhaddr); + + nbr = pim_neighbor_find(ifp, nhaddr, true); + if (!nbr) continue; - return nh->ifindex == src_ifp->ifindex && - (!pim_addr_cmp(nhaddr, src_ip)); + return nh->ifindex == src_ifp->ifindex; } return false; } @@ -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++; } |