|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] [PATCH] [xend] [ACM] Prevent labeling of vlans with the	same
 
This patch prevents the labeling of vlans with the same color.
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
 Index: root/xen-unstable.hg/tools/python/xen/util/xsm/acm/acm.py
===================================================================
--- root.orig/xen-unstable.hg/tools/python/xen/util/xsm/acm/acm.py
+++ root/xen-unstable.hg/tools/python/xen/util/xsm/acm/acm.py
@@ -1236,6 +1236,9 @@ def set_resource_label(resource, policyt
                 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)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread> |  
- [Xen-devel] [PATCH] [xend] [ACM] Prevent labeling of vlans with the	same color,
Stefan Berger <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |