if guest network type is vlan://untagged, and traffic label is used, kvm agent needs to honor traffic label

This commit is contained in:
Edison Su 2014-10-09 16:43:00 -07:00
parent 6a5e4306f2
commit 5ff1ece2be

View File

@ -125,7 +125,13 @@ public class BridgeVifDriver extends VifDriverBase {
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps); intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
} }
} else { } else {
intf.defBridgeNet(_bridges.get("guest"), null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps); String brname = "";
if (trafficLabel != null && !trafficLabel.isEmpty()) {
brname = trafficLabel;
} else {
brname = _bridges.get("guest");
}
intf.defBridgeNet(brname, null, nic.getMac(), getGuestNicModel(guestOsType, nicAdapter), networkRateKBps);
} }
} else if (nic.getType() == Networks.TrafficType.Control) { } else if (nic.getType() == Networks.TrafficType.Control) {
/* Make sure the network is still there */ /* Make sure the network is still there */