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

[Xen-API] [PATCH 33 of 33] interface-reconfigure: vswitch: explicitly co

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 33 of 33] interface-reconfigure: vswitch: explicitly configure IP device MAC address
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Fri, 18 Dec 2009 14:17:28 +0000
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Fri, 18 Dec 2009 06:23:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1261145815@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
This ensures that a VLAN fake bridge has the expected MAC address,
previously it would be random.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 6f51831a592d -r f2862a7e243d scripts/InterfaceReconfigureVswitch.py
--- a/scripts/InterfaceReconfigureVswitch.py    Fri Dec 18 14:16:32 2009 +0000
+++ b/scripts/InterfaceReconfigureVswitch.py    Fri Dec 18 14:16:32 2009 +0000
@@ -395,7 +395,11 @@
         cfgmod_argv += datapath_deconfigure_ipdev(ipdev)
         cfgmod_argv += ["# reconfigure ipdev %s" % ipdev]
         cfgmod_argv += ['--add=bridge.%s.port=%s' % (bridge, ipdev)]
-
+        if bridge == ipdev:
+            cfgmod_argv += ['--add=bridge.%s.mac=%s' % (bridge, pifrec['MAC'])]
+        else:
+            cfgmod_argv += ['--add=iface.%s.mac=%s' % (ipdev, pifrec['MAC'])]
+            
         if pif_is_vlan(self._pif):
             cfgmod_argv += ['--add=vlan.%s.tag=%s' % (ipdev, pifrec['VLAN'])]
             cfgmod_argv += ['--add=iface.%s.internal=true' % (ipdev)]

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>