summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zebra/zserv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 57b1be4b8b..5b279a7cb2 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -2614,7 +2614,7 @@ static inline void zserv_handle_commands(struct zserv *client,
struct stream *msg,
struct zebra_vrf *zvrf)
{
- if (hdr->command > sizeof(zserv_handlers)
+ if (hdr->command > array_size(zserv_handlers)
|| zserv_handlers[hdr->command] == NULL)
zlog_info("Zebra received unknown command %d", hdr->command);
else