2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00

ovs-ofctl: Improve error message for meter=0.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Joe Stringer
2014-10-31 19:02:29 +13:00
parent fa03bb9e32
commit dc8a858f50

View File

@@ -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);
}
}