mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
Summary: Fix empty traffic labels causing NullPointerExceptions on KVM
Detail: In com.cloud.hypervisor.kvm.resource.BridgeVifDriver.java, in 2 places an if block should have evaluated to true if trafficLabel was null, however it was causing a NullPointerException instead. BUG-ID : NONE Bugfix-for: 4.0 Reviewed-by: Marcus Sorensen Reported-by: Dave Cahill Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1352307750 -0700
This commit is contained in:
parent
6c411fb249
commit
b42f3f53d8
@ -89,7 +89,7 @@ public class BridgeVifDriver extends VifDriverBase {
|
||||
if (nic.getType() == Networks.TrafficType.Guest) {
|
||||
if (nic.getBroadcastType() == Networks.BroadcastDomainType.Vlan
|
||||
&& !vlanId.equalsIgnoreCase("untagged")) {
|
||||
if(trafficLabel != null || !trafficLabel.isEmpty()) {
|
||||
if(trafficLabel != null && !trafficLabel.isEmpty()) {
|
||||
s_logger.debug("creating a vlan dev and bridge for guest traffic per traffic label " + trafficLabel);
|
||||
String brName = createVlanBr(vlanId, _pifs.get(trafficLabel));
|
||||
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
|
||||
@ -107,7 +107,7 @@ public class BridgeVifDriver extends VifDriverBase {
|
||||
} else if (nic.getType() == Networks.TrafficType.Public) {
|
||||
if (nic.getBroadcastType() == Networks.BroadcastDomainType.Vlan
|
||||
&& !vlanId.equalsIgnoreCase("untagged")) {
|
||||
if(trafficLabel != null || !trafficLabel.isEmpty()){
|
||||
if(trafficLabel != null && !trafficLabel.isEmpty()){
|
||||
s_logger.debug("creating a vlan dev and bridge for public traffic per traffic label " + trafficLabel);
|
||||
String brName = createVlanBr(vlanId, _pifs.get(trafficLabel));
|
||||
intf.defBridgeNet(brName, null, nic.getMac(), getGuestNicModel(guestOsType));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user