summaryrefslogtreecommitdiff
path: root/pimd/pim_iface.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@users.noreply.github.com>2024-12-16 09:57:31 -0300
committerGitHub <noreply@github.com>2024-12-16 09:57:31 -0300
commit3bebb7be9204a51f194317438aa883f1b10c8646 (patch)
tree6e4e508a35f6d03491661b25b645008d8ae7dd5a /pimd/pim_iface.c
parent30467f8f2b3a671973aa4b0aa2bcc1e3a208cc56 (diff)
parent06c3436a12226d1f7e18e549f562ba9ecde4b394 (diff)
Merge pull request #17252 from nabahr/mcast-mode
Fix PIMD RPF lookup mode and nexthop tracking
Diffstat (limited to 'pimd/pim_iface.c')
-rw-r--r--pimd/pim_iface.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c
index bd7164c9b9..9316cebc0a 100644
--- a/pimd/pim_iface.c
+++ b/pimd/pim_iface.c
@@ -601,26 +601,13 @@ void pim_if_addr_add(struct connected *ifc)
ifp->name);
}
}
- struct pim_nexthop_cache *pnc = NULL;
- struct pim_rpf rpf;
- struct zclient *zclient = NULL;
-
- zclient = pim_zebra_zclient_get();
- /* RP config might come prior to (local RP's interface)
- IF UP event.
- In this case, pnc would not have pim enabled
- nexthops.
- Once Interface is UP and pim info is available,
- reregister
- with RNH address to receive update and add the
- interface as nexthop. */
- memset(&rpf, 0, sizeof(struct pim_rpf));
- rpf.rpf_addr = pim_addr_from_prefix(ifc->address);
- pnc = pim_nexthop_cache_find(pim_ifp->pim, &rpf);
- if (pnc)
- pim_sendmsg_zebra_rnh(pim_ifp->pim, zclient,
- pnc,
- ZEBRA_NEXTHOP_REGISTER);
+
+ /* RP config might come prior to local RP's interface IF UP event.
+ * In this case, pnc would not have pim enabled nexthops. Once
+ * Interface is UP and pim info is available, reregister with RNH
+ * address to receive update and add the interface as nexthop.
+ */
+ pim_nht_get(pim_ifp->pim, pim_addr_from_prefix(ifc->address));
}
} /* pim */
@@ -2043,7 +2030,7 @@ void pim_pim_interface_delete(struct interface *ifp)
* pim_ifp->pim_neighbor_list.
*/
pim_sock_delete(ifp, "pim unconfigured on interface");
- pim_upstream_nh_if_update(pim_ifp->pim, ifp);
+ pim_nht_upstream_if_update(pim_ifp->pim, ifp);
if (!pim_ifp->gm_enable) {
pim_if_addr_del_all(ifp);