]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd, pim6d: Fix RP Unknown IIF
authorSarita Patra <saritap@vmware.com>
Tue, 18 Oct 2022 23:27:14 +0000 (16:27 -0700)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 2 Mar 2023 06:11:17 +0000 (06:11 +0000)
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>
(cherry picked from commit ae5bcac0aee80d99d2fd2adba75733d86d36226f)

pimd/pim_nht.c

index 16dff376e325e0a96af408e540ea44b338996206..07cdac3a48db8039de84fc9791e5f56104604817 100644 (file)
@@ -568,7 +568,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)
@@ -610,7 +610,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++;
                }
@@ -961,7 +961,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++;
                }