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_tib.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_tib.c')
| -rw-r--r-- | pimd/pim_tib.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/pimd/pim_tib.c b/pimd/pim_tib.c index e21793b8ca..59172e26fe 100644 --- a/pimd/pim_tib.c +++ b/pimd/pim_tib.c @@ -34,16 +34,13 @@ tib_sg_oil_setup(struct pim_instance *pim, pim_sgaddr sg, struct interface *oif) up = pim_upstream_find(pim, &sg); if (up) { - memcpy(&nexthop, &up->rpf.source_nexthop, - sizeof(struct pim_nexthop)); - (void)pim_ecmp_nexthop_lookup(pim, &nexthop, vif_source, &grp, - 0); + memcpy(&nexthop, &up->rpf.source_nexthop, sizeof(struct pim_nexthop)); + pim_nht_lookup_ecmp(pim, &nexthop, vif_source, &grp, false); if (nexthop.interface) input_iface_vif_index = pim_if_find_vifindex_by_ifindex( pim, nexthop.interface->ifindex); } else - input_iface_vif_index = - pim_ecmp_fib_lookup_if_vif_index(pim, vif_source, &grp); + input_iface_vif_index = pim_nht_lookup_ecmp_if_vif_index(pim, vif_source, &grp); if (PIM_DEBUG_ZEBRA) zlog_debug("%s: NHT %pSG vif_source %pPAs vif_index:%d", |
