From 1958143e302c7d4f791404dc9d15a9c017a71b22 Mon Sep 17 00:00:00 2001 From: Mobashshera Rasool Date: Thu, 28 Jan 2021 08:50:39 +0000 Subject: ospf6d: add CLI to control maximum paths for routes. CLI added: maximum-paths (1-64) Issue: #7961 Signed-off-by: Mobashshera Rasool --- ospf6d/ospf6_zebra.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ospf6d/ospf6_zebra.c') diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index 7a8027a37..2b7072d34 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -343,7 +343,14 @@ static void ospf6_zebra_route_update(int type, struct ospf6_route *request, api.safi = SAFI_UNICAST; api.prefix = *dest; SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP); - api.nexthop_num = MIN(nhcount, MULTIPATH_NUM); + + if (nhcount > ospf6->max_multipath) { + if (IS_OSPF6_DEBUG_ZEBRA(SEND)) + zlog_debug( + " Nexthop count is greater than configured maximum-path, hence ignore the extra nexthops"); + } + api.nexthop_num = MIN(nhcount, ospf6->max_multipath); + ospf6_route_zebra_copy_nexthops(request, api.nexthops, api.nexthop_num, api.vrf_id); SET_FLAG(api.message, ZAPI_MESSAGE_METRIC); -- cgit v1.2.3