Skip to content

Commit 96355dc

Browse files
author
Marcus Sorensen
committed
CLOUDSTACK-6079:
fixed issue: if public traffic is on a physical network isolated by VLAN, and guest traffic is on an another physical network isolated by VXLAN, public traffic's broadcast type is updated to VXLAN by mistake. submitted-by: mail@ynojima.net
1 parent c04fb68 commit 96355dc

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3587,15 +3587,17 @@ public PhysicalNetworkTrafficType addTrafficTypeToPhysicalNetwork(Long physicalN
35873587

35883588
// For public traffic, get isolation method of physical network and update the public network accordingly
35893589
// each broadcast type will individually need to be qualified for support of public traffic
3590-
List<String> isolationMethods = network.getIsolationMethods();
3591-
if ((isolationMethods.size() == 1 && isolationMethods.get(0).toLowerCase().equals("vxlan"))
3592-
|| (isolationMethod != null && isolationMethods.contains(isolationMethod) && isolationMethod.toLowerCase().equals("vxlan"))) {
3593-
// find row in networks table that is defined as 'Public', created when zone was deployed
3594-
NetworkVO publicNetwork = _networksDao.listByZoneAndTrafficType(network.getDataCenterId(),TrafficType.Public).get(0);
3595-
if (publicNetwork != null) {
3596-
s_logger.debug("setting public network " + publicNetwork + " to broadcast type vxlan");
3597-
publicNetwork.setBroadcastDomainType(BroadcastDomainType.Vxlan);
3598-
_networksDao.persist(publicNetwork);
3590+
if (TrafficType.Public.equals(trafficType)){
3591+
List<String> isolationMethods = network.getIsolationMethods();
3592+
if ((isolationMethods.size() == 1 && isolationMethods.get(0).toLowerCase().equals("vxlan"))
3593+
|| (isolationMethod != null && isolationMethods.contains(isolationMethod) && isolationMethod.toLowerCase().equals("vxlan"))) {
3594+
// find row in networks table that is defined as 'Public', created when zone was deployed
3595+
NetworkVO publicNetwork = _networksDao.listByZoneAndTrafficType(network.getDataCenterId(),TrafficType.Public).get(0);
3596+
if (publicNetwork != null) {
3597+
s_logger.debug("setting public network " + publicNetwork + " to broadcast type vxlan");
3598+
publicNetwork.setBroadcastDomainType(BroadcastDomainType.Vxlan);
3599+
_networksDao.persist(publicNetwork);
3600+
}
35993601
}
36003602
}
36013603

0 commit comments

Comments
 (0)