Skip to content

Commit 7bd5c58

Browse files
committed
fix http://bugs.cloud.com/show_bug.cgi?id=14775, it happened when untagged network created on tagged vlan
1 parent 5751385 commit 7bd5c58

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,12 +1249,12 @@ public Answer execute(IpAssocCommand cmd) {
12491249
if (nic.getBrName().equalsIgnoreCase(_linkLocalBridgeName)) {
12501250
vlanAllocatedToVM.put("LinkLocal", nicPos);
12511251
} else {
1252-
String vlanId = getVlanIdFromBridge(nic.getBrName());
1253-
if (vlanId != null) {
1254-
vlanAllocatedToVM.put(vlanId, nicPos);
1255-
} else {
1256-
vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos);
1257-
}
1252+
if (nic.getBrName().equalsIgnoreCase(_publicBridgeName) || nic.getBrName().equalsIgnoreCase(_privBridgeName) || nic.getBrName().equalsIgnoreCase(_guestBridgeName)) {
1253+
vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos);
1254+
} else {
1255+
String vlanId = getVlanIdFromBridge(nic.getBrName());
1256+
vlanAllocatedToVM.put(vlanId, nicPos);
1257+
}
12581258
}
12591259
nicPos++;
12601260
}

0 commit comments

Comments
 (0)