diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-06-22 14:12:04 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-06-23 19:29:19 +0200 |
commit | 75700af6027073a2ede58b429ec49b6beb05dcb3 (patch) | |
tree | 18a84e3f929f681e2c2232fca177a72f49febdc6 /pimd/pim_rpf.c | |
parent | bgpd: Cleanup pointer assignment so compiler doesn't get confused (diff) | |
download | frr-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.c | 9 |
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", |