Skip to content

Commit 224c48a

Browse files
author
Abhinandan Prateek
committed
Fix issue with sourceCidr not being passed to the VRouter on start
1 parent 04adfe4 commit 224c48a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@
189189
import com.cloud.network.rules.StaticNatImpl;
190190
import com.cloud.network.rules.StaticNatRule;
191191
import com.cloud.network.rules.dao.PortForwardingRulesDao;
192+
import com.cloud.network.rules.FirewallRuleVO;
192193
import com.cloud.network.vpn.Site2SiteVpnManager;
193194
import com.cloud.offering.NetworkOffering;
194195
import com.cloud.offering.ServiceOffering;
@@ -2794,12 +2795,11 @@ public DomainRouterVO stop(VirtualRouter router, boolean forced, User user, Acco
27942795
}
27952796

27962797
@Override
2797-
public boolean configDhcpForSubnet(Network network, final NicProfile nic, VirtualMachineProfile<UserVm> profile, DeployDestination dest, List<DomainRouterVO> routers) throws ResourceUnavailableException {
2798+
public boolean configDhcpForSubnet(Network network, final NicProfile nic, VirtualMachineProfile<UserVm> profile, DeployDestination dest, List<DomainRouterVO> routers)
2799+
throws ResourceUnavailableException {
27982800
_userVmDao.loadDetails((UserVmVO) profile.getVirtualMachine());
27992801

28002802
final VirtualMachineProfile<UserVm> updatedProfile = profile;
2801-
final boolean isZoneBasic = (dest.getDataCenter().getNetworkType() == NetworkType.Basic);
2802-
final Long podId = isZoneBasic ? dest.getPod().getId() : null;
28032803

28042804
//Asuming we have only one router per network For Now.
28052805
DomainRouterVO router = routers.get(0);
@@ -3732,6 +3732,7 @@ private void createFirewallRulesCommands(List<? extends FirewallRule> rules, Vir
37323732
}
37333733
rulesTO = new ArrayList<FirewallRuleTO>();
37343734
for (FirewallRule rule : rules) {
3735+
_rulesDao.loadSourceCidrs((FirewallRuleVO)rule);
37353736
FirewallRule.TrafficType traffictype = rule.getTrafficType();
37363737
if(traffictype == FirewallRule.TrafficType.Ingress){
37373738
IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());

0 commit comments

Comments
 (0)