[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH 33 of 33] interface-reconfigure: vswitch: explicitly configure IP device MAC address



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.