bgp_recalculate_all_bestpaths (bgp);
- if ((MULTIPATH_NUM != 0) && (maxpaths > MULTIPATH_NUM))
+ if (maxpaths > MULTIPATH_NUM)
vty_out (vty,
"%% Warning: maximum-paths set to %d is greater than %d that zebra is compiled to support%s",
maxpaths, MULTIPATH_NUM, VTY_NEWLINE);
MULTIPATH_NUM=1
case "${enable_multipath}" in
- [[0-9]|[1-9][0-9]])
+ 0)
+ MULTIPATH_NUM=64
+ ;;
+ [[1-9]|[1-9][0-9]])
MULTIPATH_NUM="${enable_multipath}"
;;
"")
nexthop_num = 0;
for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing))
{
- if (MULTIPATH_NUM != 0 && nexthop_num >= MULTIPATH_NUM)
+ if (nexthop_num >= MULTIPATH_NUM)
break;
if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
int num_nhs;
/*
- * Nexthop structures. We keep things simple for now by enforcing a
- * maximum of 64 in case MULTIPATH_NUM is 0;
+ * Nexthop structures
*/
- netlink_nh_info_t nhs[MAX (MULTIPATH_NUM, 64)];
+ netlink_nh_info_t nhs[MULTIPATH_NUM];
union g_addr *pref_src;
} netlink_route_info_t;
for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing))
{
- if (MULTIPATH_NUM != 0 && ri->num_nhs >= MULTIPATH_NUM)
+ if (ri->num_nhs >= MULTIPATH_NUM)
break;
if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_RECURSIVE))
void
zserv_nexthop_num_warn (const char *caller, const struct prefix *p, const u_char nexthop_num)
{
- if ((MULTIPATH_NUM != 0) && (nexthop_num > MULTIPATH_NUM))
+ if (nexthop_num > MULTIPATH_NUM)
{
char buff[80];
prefix2str(p, buff, 80);