summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 910e05cb47..e30f166dde 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -915,9 +915,10 @@ int zapi_route_encode(u_char cmd, struct stream *s, struct zapi_route *api)
prefix2str(&api->prefix, buf, sizeof(buf));
zlog_warn(
- "%s: prefix %s: encoding %u nexthops out of %u",
- __func__, buf, MULTIPATH_NUM, api->nexthop_num);
- api->nexthop_num = MULTIPATH_NUM;
+ "%s: prefix %s: can't encode %u nexthops "
+ "(maximum is %u)",
+ __func__, buf, api->nexthop_num, MULTIPATH_NUM);
+ return -1;
}
stream_putw(s, api->nexthop_num);