summaryrefslogtreecommitdiffstats
path: root/lib/nexthop_group.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-10-01 20:31:08 +0200
committerDonald Sharp <sharpd@nvidia.com>2024-10-01 21:38:14 +0200
commit0bc79f5e51827fad611d714da5e926da2bd123a7 (patch)
tree2f589ca66d21740937a7c2b02b712066dad1508c /lib/nexthop_group.h
parentMerge pull request #16958 from opensourcerouting/calloc-warning-fix (diff)
downloadfrr-0bc79f5e51827fad611d714da5e926da2bd123a7.tar.xz
frr-0bc79f5e51827fad611d714da5e926da2bd123a7.zip
lib: nexthop code should use uint16_t for nexthop counting
It's possible to specify via the cli and configure how many nexthops that are allowed on the system. If you happen to have > 255 then things are about to get interesting otherwise. Let's allow up to 65k nexthops (ha!) Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to '')
-rw-r--r--lib/nexthop_group.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/nexthop_group.h b/lib/nexthop_group.h
index 822a35439..910329941 100644
--- a/lib/nexthop_group.h
+++ b/lib/nexthop_group.h
@@ -149,9 +149,8 @@ extern void nexthop_group_json_nexthop(json_object *j,
const struct nexthop *nh);
/* Return the number of nexthops in this nhg */
-extern uint8_t nexthop_group_nexthop_num(const struct nexthop_group *nhg);
-extern uint8_t
-nexthop_group_active_nexthop_num(const struct nexthop_group *nhg);
+extern uint16_t nexthop_group_nexthop_num(const struct nexthop_group *nhg);
+extern uint16_t nexthop_group_active_nexthop_num(const struct nexthop_group *nhg);
extern bool nexthop_group_has_label(const struct nexthop_group *nhg);