You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/11/06 10:37:14 UTC

[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4442: Preventing port 53 being added as lb rule when dns service is availab…

DaanHoogland commented on a change in pull request #4442:
URL: https://github.com/apache/cloudstack/pull/4442#discussion_r518655821



##########
File path: server/src/main/java/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
##########
@@ -1598,65 +1602,73 @@ public LoadBalancer createPublicLoadBalancerRule(String xId, String name, String
         // LoadBalancer result = _elbMgr.handleCreateLoadBalancerRule(lb,
         // lbOwner, lb.getNetworkId());
         LoadBalancer result = null;
-        if (result == null) {
-            IpAddress systemIp = null;
-            NetworkOffering off = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId());
-            if (off.isElasticLb() && ipVO == null && network.getVpcId() == null) {
-                systemIp = _ipAddrMgr.assignSystemIp(networkId, lbOwner, true, false);
-                if (systemIp != null) {
-                    ipVO = _ipAddressDao.findById(systemIp.getId());
+        IpAddress systemIp = null;
+        NetworkOffering off = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId());
+
+        if (srcPortStart == 53 && ipVO.isSourceNat()) {

Review comment:
       can you factor 53 out as DNS_PORT?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org