Skip to content

Commit

Permalink
ovs-ofctl: Improve error message for meter=0.
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
joestringer committed Oct 31, 2014
1 parent fa03bb9 commit dc8a858
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ofp-parse.c
Expand Up @@ -588,7 +588,8 @@ parse_ofp_meter_mod_str__(struct ofputil_meter_mod *mm, char *string,
if (error) {
return error;
}
if (mm->meter.meter_id > OFPM13_MAX) {
if (mm->meter.meter_id > OFPM13_MAX
|| !mm->meter.meter_id) {
return xasprintf("invalid value for %s", name);
}
}
Expand Down

0 comments on commit dc8a858

Please sign in to comment.