nagaboinaramgopal opened a new pull request, #14027:
URL: https://github.com/apache/cloudstack/pull/14027

   Description
   ### Description
   
   `createPublicLoadBalancerRule` guards a special case for the DNS port before 
it
   has resolved the public IP:
   
       if (srcPortStart == DNS_PORT && ipVO.isSourceNat()) {
   
   When the caller does not pass an explicit IP (`ipAddrId` is null), `ipVO` is 
null
   at this point, so creating a load balancer rule on the DNS port throws a
   NullPointerException instead of the normal validation error. Fixed by
   null-checking `ipVO` before calling `isSourceNat()`, so the DNS/Source NAT 
branch
   is skipped when there is no IP and the flow reaches the intended parameter
   validation.
   
   ### Types of changes
   
   - [x] Bug fix (non-breaking change which fixes an issue)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Bug Severity
   
   - [x] Minor
   
   ### How Has This Been Tested?
   
   Added a unit test that creates a public load balancer rule on the DNS port 
with
   no explicit IP and asserts it fails with a parameter validation error 
instead of
   a NullPointerException. Also built the standard packages and deployed on a 
KVM
   advanced zone.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to