You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GabrielBrascher <gi...@git.apache.org> on 2016/03/05 21:44:56 UTC

[GitHub] cloudstack pull request: CLOUDSTACK-9287 - Fix unique mac address ...

Github user GabrielBrascher commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1413#discussion_r55127619
  
    --- Diff: server/src/com/cloud/network/element/VpcVirtualRouterElement.java ---
    @@ -559,9 +559,16 @@ public boolean applyACLItemsToPrivateGw(final PrivateGateway gateway, final List
             final DataCenterVO dcVO = _dcDao.findById(network.getDataCenterId());
             final NetworkTopology networkTopology = networkTopologyContext.retrieveNetworkTopology(dcVO);
     
    +        final Network privateNetwork = _networkModel.getNetwork(gateway.getNetworkId());
    +
             boolean result = true;
             for (final DomainRouterVO domainRouterVO : routers) {
    -            result = result && networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);
    +            final NicProfile nicProfile = _networkModel.getNicProfile(domainRouterVO, privateNetwork.getId(), null);
    +            if (nicProfile != null) {
    +                result = result && networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);
    --- End diff --
    
    @wilderrodrigues I think it might be more readable if changed to:
    `return networkTopology.applyNetworkACLs(network, rules, domainRouterVO, isPrivateGateway);`
    Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---