@@ -591,12 +591,9 @@ parse_nexthop_unicast(ns_id_t ns_id, struct rtmsg *rtm, struct rtattr **tb,
591591 return nh ;
592592}
593593
594- static uint8_t parse_multipath_nexthops_unicast (ns_id_t ns_id ,
595- struct nexthop_group * ng ,
596- struct rtmsg * rtm ,
597- struct rtnexthop * rtnh ,
598- struct rtattr * * tb ,
599- void * prefsrc , vrf_id_t vrf_id )
594+ static uint16_t parse_multipath_nexthops_unicast (ns_id_t ns_id , struct nexthop_group * ng ,
595+ struct rtmsg * rtm , struct rtnexthop * rtnh ,
596+ struct rtattr * * tb , void * prefsrc , vrf_id_t vrf_id )
600597{
601598 void * gate = NULL ;
602599 struct interface * ifp = NULL ;
@@ -721,7 +718,7 @@ static uint8_t parse_multipath_nexthops_unicast(ns_id_t ns_id,
721718 rtnh = RTNH_NEXT (rtnh );
722719 }
723720
724- uint8_t nhop_num = nexthop_group_nexthop_num (ng );
721+ uint16_t nhop_num = nexthop_group_nexthop_num (ng );
725722
726723 return nhop_num ;
727724}
@@ -1000,7 +997,7 @@ int netlink_route_change_read_unicast_internal(struct nlmsghdr *h,
1000997 (struct rtnexthop * )RTA_DATA (tb [RTA_MULTIPATH ]);
1001998
1002999 if (!nhe_id ) {
1003- uint8_t nhop_num ;
1000+ uint16_t nhop_num ;
10041001
10051002 /* Use temporary list of nexthops; parse
10061003 * message payload's nexthops.
@@ -2644,11 +2641,9 @@ int kernel_get_ipmr_sg_stats(struct zebra_vrf *zvrf, void *in)
26442641/* Char length to debug ID with */
26452642#define ID_LENGTH 10
26462643
2647- static bool _netlink_nexthop_build_group (struct nlmsghdr * n , size_t req_size ,
2648- uint32_t id ,
2649- const struct nh_grp * z_grp ,
2650- const uint8_t count , bool resilient ,
2651- const struct nhg_resilience * nhgr )
2644+ static bool _netlink_nexthop_build_group (struct nlmsghdr * n , size_t req_size , uint32_t id ,
2645+ const struct nh_grp * z_grp , const uint16_t count ,
2646+ bool resilient , const struct nhg_resilience * nhgr )
26522647{
26532648 struct nexthop_grp grp [count ];
26542649 /* Need space for max group size, "/", and null term */
@@ -3285,7 +3280,7 @@ static int netlink_nexthop_process_group(struct rtattr **tb,
32853280 struct nh_grp * z_grp , int z_grp_size ,
32863281 struct nhg_resilience * nhgr )
32873282{
3288- uint8_t count = 0 ;
3283+ uint16_t count = 0 ;
32893284 /* linux/nexthop.h group struct */
32903285 struct nexthop_grp * n_grp = NULL ;
32913286
@@ -3358,7 +3353,7 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
33583353 struct nexthop nh = {.weight = 1 };
33593354 struct nh_grp grp [MULTIPATH_NUM ] = {};
33603355 /* Count of nexthops in group array */
3361- uint8_t grp_count = 0 ;
3356+ uint16_t grp_count = 0 ;
33623357 struct rtattr * tb [NHA_MAX + 1 ] = {};
33633358
33643359 frrtrace (3 , frr_zebra , netlink_nexthop_change , h , ns_id , startup );
0 commit comments