diff options
| author | Nathan Bahr <nbahr@atcorp.com> | 2024-10-23 19:00:31 +0000 |
|---|---|---|
| committer | Nathan Bahr <nbahr@atcorp.com> | 2024-12-13 17:36:34 +0000 |
| commit | 6d30c8f6b53a7d453f455e28615a57a6aadc0660 (patch) | |
| tree | bb65b88b096b170b9fb757f2c797ce5174c9b8a1 /pimd/pim_mroute.c | |
| parent | cc865c0192a121856636552f74c7df2e389b4a5c (diff) | |
pimd: Refactor pim NHT
Refactor the next hop tracking in PIM to fully support the configured RPF lookup mode.
Moved many NHT related functions to pim_nht.h/c
NHT now tracks both MRIB and URIB tables and makes nexthop decisions based on the configured lookup mode.
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
Diffstat (limited to 'pimd/pim_mroute.c')
| -rw-r--r-- | pimd/pim_mroute.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 96eb5f48f5..93bdd8dac9 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -36,6 +36,7 @@ #include "pim_vxlan.h" #include "pim_msg.h" #include "pim_util.h" +#include "pim_nht.h" static void mroute_read_on(struct pim_instance *pim); static int pim_upstream_mroute_update(struct channel_oil *c_oil, @@ -566,8 +567,7 @@ int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf, * setting the SPTBIT to true */ if (!(pim_addr_is_any(up->upstream_register)) && - pim_nexthop_lookup(pim_ifp->pim, &source, - up->upstream_register, 0)) { + pim_nht_lookup(pim_ifp->pim, &source, up->upstream_register, 0)) { pim_register_stop_send(source.interface, &sg, pim_ifp->primary_address, up->upstream_register); @@ -580,9 +580,7 @@ int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, const char *buf, __func__); } else { if (I_am_RP(pim_ifp->pim, up->sg.grp)) { - if (pim_nexthop_lookup(pim_ifp->pim, &source, - up->upstream_register, - 0)) + if (pim_nht_lookup(pim_ifp->pim, &source, up->upstream_register, 0)) pim_register_stop_send( source.interface, &sg, pim_ifp->primary_address, |
