summaryrefslogtreecommitdiffstats
path: root/pimd/pim_rpf.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-06-22 14:12:04 +0200
committerDonald Sharp <sharpd@nvidia.com>2022-06-23 19:29:19 +0200
commit75700af6027073a2ede58b429ec49b6beb05dcb3 (patch)
tree18a84e3f929f681e2c2232fca177a72f49febdc6 /pimd/pim_rpf.c
parentbgpd: Cleanup pointer assignment so compiler doesn't get confused (diff)
downloadfrr-75700af6027073a2ede58b429ec49b6beb05dcb3.tar.xz
frr-75700af6027073a2ede58b429ec49b6beb05dcb3.zip
pimd: Limit pim's ecmp to what zebra tells us is the multipath
Zebra can be setup to use a value that is less than MULTIPATH_NUM. When pimd connects to zebra, zebra will inform pim about the MULTIPATH_NUM used. Let's use that value for figuring out our multipath value. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pimd/pim_rpf.c')
-rw-r--r--pimd/pim_rpf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/pimd/pim_rpf.c b/pimd/pim_rpf.c
index c470bcd4d..bd4dd31a2 100644
--- a/pimd/pim_rpf.c
+++ b/pimd/pim_rpf.c
@@ -54,7 +54,7 @@ void pim_rpf_set_refresh_time(struct pim_instance *pim)
bool pim_nexthop_lookup(struct pim_instance *pim, struct pim_nexthop *nexthop,
pim_addr addr, int neighbor_needed)
{
- struct pim_zlookup_nexthop nexthop_tab[MULTIPATH_NUM];
+ struct pim_zlookup_nexthop nexthop_tab[router->multipath];
struct pim_neighbor *nbr = NULL;
int num_ifindex;
struct interface *ifp = NULL;
@@ -92,9 +92,10 @@ bool pim_nexthop_lookup(struct pim_instance *pim, struct pim_nexthop *nexthop,
}
memset(nexthop_tab, 0,
- sizeof(struct pim_zlookup_nexthop) * MULTIPATH_NUM);
- num_ifindex = zclient_lookup_nexthop(pim, nexthop_tab, MULTIPATH_NUM,
- addr, PIM_NEXTHOP_LOOKUP_MAX);
+ sizeof(struct pim_zlookup_nexthop) * router->multipath);
+ num_ifindex =
+ zclient_lookup_nexthop(pim, nexthop_tab, router->multipath,
+ addr, PIM_NEXTHOP_LOOKUP_MAX);
if (num_ifindex < 1) {
zlog_warn(
"%s %s: could not find nexthop ifindex for address %pPAs",