WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] [xend] [ACM] Prevent labeling of vlans with the same

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] [xend] [ACM] Prevent labeling of vlans with the same color
From: Stefan Berger <stefanb@xxxxxxxxxx>
Date: Wed, 02 Apr 2008 20:32:08 -0400
Cc: Keir Fraser <keir.fraser@xxxxxxxxxxxx>
Delivery-date: Wed, 02 Apr 2008 17:32:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: stefanb@xxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 <=