mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xend, acm: Prevent labeling of vlans with the same color
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
1 parent
a0c04c2c3d
commit
0103c5e512
1 file changed
+3
@@ -1220,6 +1220,9 @@ def set_resource_label(resource, policytype, policyref, reslabel, \
|
||||
return -xsconstants.XSERR_BAD_LABEL
|
||||
if tmp[2] != oreslabel:
|
||||
return -xsconstants.XSERR_BAD_LABEL
|
||||
if resource.startswith('vlan:'):
|
||||
if tuple([policytype, policyref, reslabel]) in access_control.values():
|
||||
return -xsconstants.XSERR_BAD_LABEL
|
||||
if reslabel != "":
|
||||
new_entry = { resource : tuple([policytype, policyref, reslabel])}
|
||||
access_control.update(new_entry)
|
||||
|
||||