diff options
Diffstat (limited to 'staticd/static_nb_config.c')
| -rw-r--r-- | staticd/static_nb_config.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/staticd/static_nb_config.c b/staticd/static_nb_config.c index 470c7bdad5..9ccffe53d9 100644 --- a/staticd/static_nb_config.c +++ b/staticd/static_nb_config.c @@ -115,7 +115,7 @@ static int static_path_list_tag_modify(struct nb_cb_modify_args *args) } struct nexthop_iter { - int count; + uint32_t count; bool blackhole; }; @@ -169,7 +169,12 @@ static bool static_nexthop_create(struct nb_cb_create_args *args) if (iter.blackhole && iter.count > 1) { snprintf( args->errmsg, args->errmsg_len, - "Route can not have blackhole and non-blackhole nexthops simultaneously"); + "Route cannot have blackhole and non-blackhole nexthops simultaneously"); + return NB_ERR_VALIDATION; + } else if (iter.count > zebra_ecmp_count) { + snprintf(args->errmsg, args->errmsg_len, + "Route cannot have more than %d ECMP nexthops", + zebra_ecmp_count); return NB_ERR_VALIDATION; } break; |
