incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: fix http://bugs.cloud.com/show_bug.cgi?id=14775, it happened when untagged network created on tagged vlan
Date Wed, 29 Aug 2012 16:47:07 GMT
Updated Branches:
  refs/heads/master 575138544 -> 7bd5c58fc


fix http://bugs.cloud.com/show_bug.cgi?id=14775, it happened when untagged network created
on tagged vlan


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/7bd5c58f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/7bd5c58f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/7bd5c58f

Branch: refs/heads/master
Commit: 7bd5c58fc3ff8ea6600aa5704374fe04edf6934e
Parents: 5751385
Author: Edison Su <sudison@gmail.com>
Authored: Wed Aug 29 09:46:44 2012 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Wed Aug 29 09:46:44 2012 -0700

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java     |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/7bd5c58f/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 5623260..48dc3d0 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -1249,12 +1249,12 @@ public class LibvirtComputingResource extends ServerResourceBase implements
                 if (nic.getBrName().equalsIgnoreCase(_linkLocalBridgeName)) {
                     vlanAllocatedToVM.put("LinkLocal", nicPos);
                 } else {
-                    String vlanId = getVlanIdFromBridge(nic.getBrName());
-                    if (vlanId != null) {
-                        vlanAllocatedToVM.put(vlanId, nicPos);
-                    } else {
-                        vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos);
-                    }
+                	if (nic.getBrName().equalsIgnoreCase(_publicBridgeName) || nic.getBrName().equalsIgnoreCase(_privBridgeName)
|| nic.getBrName().equalsIgnoreCase(_guestBridgeName)) {
+                		vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos);
+                	} else {
+                		String vlanId = getVlanIdFromBridge(nic.getBrName());
+                		vlanAllocatedToVM.put(vlanId, nicPos);
+                	}
                 }
                 nicPos++;
             }


Mime
View raw message