*: Fix MULTIPATH_NUM check in nhg encode

In zapi_nhg_encode we check if number of paths are >=
MULTIPATH_NUM, the condition should be just checking if it is > not >=

Signed-off-by: Karthikeya Venkat Muppalla <kmuppalla@nvidia.com>
This commit is contained in:
Karthikeya Venkat Muppalla 2025-04-18 11:39:40 -07:00
parent 5d4c7d2ece
commit 52dc1bb9be

View file

@ -1275,8 +1275,8 @@ static int zapi_nhg_encode(struct stream *s, int cmd, struct zapi_nhg *api_nhg)
return -1; return -1;
} }
if (api_nhg->nexthop_num >= MULTIPATH_NUM || if (api_nhg->nexthop_num > MULTIPATH_NUM ||
api_nhg->backup_nexthop_num >= MULTIPATH_NUM) { api_nhg->backup_nexthop_num > MULTIPATH_NUM) {
flog_err(EC_LIB_ZAPI_ENCODE, flog_err(EC_LIB_ZAPI_ENCODE,
"%s: zapi NHG encode with invalid input", __func__); "%s: zapi NHG encode with invalid input", __func__);
return -1; return -1;