CS-16426 For network offerings with IP conserved mode off, LB/PF/StaticNAT rule creation fails if the first rule is firewall

fixes, accidental modification of network services map object corresponding to a public IP
This commit is contained in:
Murali Reddy 2012-09-30 18:21:50 +05:30 committed by Sheng Yang
parent e8fd65d867
commit 4e1f3f9410
1 changed files with 2 additions and 1 deletions

View File

@ -878,7 +878,8 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
NetworkOffering offering = _networkOfferingDao.findById(network.getNetworkOfferingId());
if (!offering.isConserveMode()) {
for (PublicIp ip : ipToServices.keySet()) {
Set<Service> services = ipToServices.get(ip);
Set<Service> services = new HashSet<Service>() ;
services.addAll(ipToServices.get(ip));
if (services != null && services.contains(Service.Firewall)) {
services.remove(Service.Firewall);
}