diff --git a/device_mapper/libdm-report.c b/device_mapper/libdm-report.c index 362c8b8b6..122ca83ab 100644 --- a/device_mapper/libdm-report.c +++ b/device_mapper/libdm-report.c @@ -2589,7 +2589,8 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi if (iter->type & DM_REPORT_FIELD_TYPE_MASK) { if (!(iter->type & supported_reserved_types) || ((iter->type & DM_REPORT_FIELD_RESERVED_VALUE_RANGE) && - !(iter->type & supported_reserved_types_with_range))) { + !(iter->type & (supported_reserved_types_with_range & + ~DM_REPORT_FIELD_RESERVED_VALUE_RANGE)))) { log_error(INTERNAL_ERROR "_check_reserved_values_supported: " "global reserved value for type 0x%x not supported", iter->type); @@ -2600,7 +2601,8 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi field = &fields[field_res->field_num]; if (!(field->flags & supported_reserved_types) || ((iter->type & DM_REPORT_FIELD_RESERVED_VALUE_RANGE) && - !(iter->type & supported_reserved_types_with_range))) { + !(iter->type & (supported_reserved_types_with_range & + ~DM_REPORT_FIELD_RESERVED_VALUE_RANGE)))) { log_error(INTERNAL_ERROR "_check_reserved_values_supported: " "field-specific reserved value of type 0x%x for " "field %s not supported", diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 5e74d9129..87defe94a 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -2587,7 +2587,8 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi if (iter->type & DM_REPORT_FIELD_TYPE_MASK) { if (!(iter->type & supported_reserved_types) || ((iter->type & DM_REPORT_FIELD_RESERVED_VALUE_RANGE) && - !(iter->type & supported_reserved_types_with_range))) { + !(iter->type & (supported_reserved_types_with_range & + ~DM_REPORT_FIELD_RESERVED_VALUE_RANGE)))) { log_error(INTERNAL_ERROR "_check_reserved_values_supported: " "global reserved value for type 0x%x not supported", iter->type); @@ -2598,7 +2599,8 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi field = &fields[field_res->field_num]; if (!(field->flags & supported_reserved_types) || ((iter->type & DM_REPORT_FIELD_RESERVED_VALUE_RANGE) && - !(iter->type & supported_reserved_types_with_range))) { + !(iter->type & (supported_reserved_types_with_range & + ~DM_REPORT_FIELD_RESERVED_VALUE_RANGE)))) { log_error(INTERNAL_ERROR "_check_reserved_values_supported: " "field-specific reserved value of type 0x%x for " "field %s not supported",