mirror of
https://github.com/openvswitch/ovs
synced 2025-09-03 07:45:30 +00:00
dpif-netdev: Use portable error code for zero rate meter band
'EBADRQC' is only defined on the Linux platform. Without this fix,
The travis MacOS build fails. Switching to using EDOM which is more
portable.
Fixes: 2029ce9ac3
(dpif-netdev: Fix a zero-rate bug for meter)
CC: Ali Volkan ATLI <volkan.atli@argela.com.tr>
Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
This commit is contained in:
@@ -4285,7 +4285,7 @@ dpif_netdev_meter_set(struct dpif *dpif, ofproto_meter_id *meter_id,
|
||||
/* Validate rates */
|
||||
for (i = 0; i < config->n_bands; i++) {
|
||||
if (config->bands[i].rate == 0) {
|
||||
return EBADRQC; /* rate must be non-zero */
|
||||
return EDOM; /* rate must be non-zero */
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user