Skip to content

Commit 5ff1ece

Browse files
committed
if guest network type is vlan://untagged, and traffic label is used, kvm agent needs to honor traffic label
1 parent 6a5e430 commit 5ff1ece

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,13 @@ public LibvirtVMDef.InterfaceDef plug(NicTO nic, String guestOsType, String nicA
125125
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
126126
}
127127
} else {
128-
intf.defBridgeNet(_bridges.get("guest"), null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
128+
String brname = "";
129+
if (trafficLabel != null && !trafficLabel.isEmpty()) {
130+
brname = trafficLabel;
131+
} else {
132+
brname = _bridges.get("guest");
133+
}
134+
intf.defBridgeNet(brname, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
129135
}
130136
} else if (nic.getType() == Networks.TrafficType.Control) {
131137
/* Make sure the network is still there */

0 commit comments

Comments
 (0)