]> xenbits.xensource.com Git - xen.git/commitdiff
xend, acm: Prevent labeling of vlans with the same color
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 3 Apr 2008 10:32:20 +0000 (11:32 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 3 Apr 2008 10:32:20 +0000 (11:32 +0100)
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
tools/python/xen/util/xsm/acm/acm.py

index e8de0fa60c03927fa9b786cc8c11daa2bc455611..ed93e28485318c33d1938e8bb6bdeb890d453d15 100644 (file)
@@ -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)