pci: handle 'class' alias correctly

Fixes #1541
This commit is contained in:
Alexander Boettcher 2015-05-26 10:40:22 +02:00 committed by Christian Helmuth
parent 30a02a5d92
commit 1592e78387

View File

@ -237,8 +237,10 @@ namespace Pci {
} catch (Xml_attribute::Nonexistent_attribute) {
return;
}
/* if this does not identical matches - deny access */
if ((class_sub_prog & class_code) != class_sub_prog)
enum { DONT_CHECK_PROGIF = 8 };
/* if class/subclass don't match - deny */
if ((class_sub_prog ^ class_code) >> DONT_CHECK_PROGIF)
return;
/* if this bdf is used by some policy - deny */