From 66aeba23bd8effd71e0a3cf9c0cab75f3d75f6f1 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 1 Feb 2010 09:50:14 -0800 Subject: [PATCH] CA-37154: vswitch: Use MAC address of tagged PIF for VLAN fake-bridge This is because PIF.MAC for a VLAN is FE:FF:FF:FF:FF:FF. In bridge mode the VLAN and the bridge naturally pick up the underlying MAC address from the physical device but under vswitch we must explicitly specify it and we are currently specifying FE:FF:FF:FF:FF. interface-reconfigure needs to use the MAC address of the tagged PIF not the untagged PIF. Signed-off-by: Ian Campbell # HG changeset patch # User Ian Campbell # Date 1265020755 0 # Node ID d7fc59d6a274334377fdbb09dcaf80a76431bcdb # Parent a6f27b5a3096ce627b5003c7be19ca59f7dd9606 --- .../opt_xensource_libexec_InterfaceReconfigureVswitch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py index 6f093a4ae..7ba0d24d1 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py @@ -342,6 +342,7 @@ class DatapathVswitch(Datapath): extra_ports = [] pifrec = db().get_pif_record(self._pif) + dprec = db().get_pif_record(self._dp) ipdev = self._ipdev bridge = pif_bridge_name(self._dp) @@ -369,9 +370,9 @@ class DatapathVswitch(Datapath): 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'])] + cfgmod_argv += ['--add=bridge.%s.mac=%s' % (bridge, dprec['MAC'])] else: - cfgmod_argv += ['--add=iface.%s.mac=%s' % (ipdev, pifrec['MAC'])] + cfgmod_argv += ['--add=iface.%s.mac=%s' % (ipdev, dprec['MAC'])] if pif_is_vlan(self._pif): cfgmod_argv += ['--add=vlan.%s.tag=%s' % (ipdev, pifrec['VLAN'])] -- 2.43.0