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-changelog

[Xen-changelog] [xen-unstable] xend: Disallow bogus MAC addresses when c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Disallow bogus MAC addresses when creating new VIF devices
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Apr 2009 23:00:21 -0700
Delivery-date: Tue, 07 Apr 2009 23:00:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1238494359 -3600
# Node ID f86ebd7f887a2d26a397cd3285954675ca6e3892
# Parent  1f8e6aca086813c3a81354a4c366b1c2434298d2
xend: Disallow bogus MAC addresses when creating new VIF devices

Signed-off-by: Michal Novotny <minovotn@xxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    7 +++++++
 1 files changed, 7 insertions(+)

diff -r 1f8e6aca0868 -r f86ebd7f887a tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Mar 31 11:10:06 2009 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Mar 31 11:12:39 2009 +0100
@@ -723,6 +723,13 @@ class XendDomainInfo:
         dev_config_dict = self.info['devices'][dev_uuid][1]
         log.debug("XendDomainInfo.device_create: %s" % 
scrub_password(dev_config_dict))
 
+        if dev_type == 'vif':
+            for x in dev_config:
+                if x != 'vif' and x[0] == 'mac':
+                    if not re.match('^([0-9a-f]{2}:){5}[0-9a-f]{2}$', x[1], 
re.I):
+                        log.error("Virtual network interface creation error - 
invalid MAC Address entered: %s", x[1])
+                        raise VmError("Cannot create a new virtual network 
interface - MAC address is not valid!");
+
         if self.domid is not None:
             try:
                 dev_config_dict['devid'] = devid = \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Disallow bogus MAC addresses when creating new VIF devices, Xen patchbot-unstable <=