Skip to content

Commit f78e7ae

Browse files
author
Daan Hoogland
committed
[CLOUDSTACK-6232] bridging allowed in isolated networks
1 parent 454cac4 commit f78e7ae

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎server/src/com/cloud/network/NetworkServiceImpl.java‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
import javax.inject.Inject;
4141
import javax.naming.ConfigurationException;
4242

43+
import org.apache.log4j.Logger;
44+
4345
import org.apache.cloudstack.acl.ControlledEntity.ACLType;
4446
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
4547
import org.apache.cloudstack.api.command.admin.network.DedicateGuestVlanRangeCmd;
@@ -53,7 +55,6 @@
5355
import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
5456
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
5557
import org.apache.cloudstack.network.element.InternalLoadBalancerElementService;
56-
import org.apache.log4j.Logger;
5758

5859
import com.cloud.api.ApiDBUtils;
5960
import com.cloud.configuration.Config;
@@ -1237,7 +1238,10 @@ && areServicesSupportedByNetworkOffering(ntwkOff.getId(), Service.SourceNat))) {
12371238

12381239
// Vlan is created in 1 cases - works in Advance zone only:
12391240
// 1) GuestType is Shared
1240-
boolean createVlan = (startIP != null && endIP != null && zone.getNetworkType() == NetworkType.Advanced && (ntwkOff.getGuestType() == Network.GuestType.Shared));
1241+
boolean createVlan = (startIP != null && endIP != null && zone.getNetworkType() == NetworkType.Advanced
1242+
&& ((ntwkOff.getGuestType() == Network.GuestType.Shared)
1243+
|| (ntwkOff.getGuestType() == GuestType.Isolated &&
1244+
!areServicesSupportedByNetworkOffering(ntwkOff.getId(), Service.SourceNat))));
12411245

12421246
if (!createVlan) {
12431247
// Only support advance shared network in IPv6, which means createVlan is a must
@@ -4005,7 +4009,8 @@ public List<NetworkGuru> getNetworkGurus() {
40054009

40064010
@Inject
40074011
public void setNetworkGurus(List<NetworkGuru> networkGurus) {
4008-
this._networkGurus = networkGurus;
4012+
_networkGurus = networkGurus;
4013+
40094014
}
40104015

40114016
}

0 commit comments

Comments
 (0)