Damans227 commented on code in PR #13795:
URL: https://github.com/apache/cloudstack/pull/13795#discussion_r3974973426


##########
server/src/main/java/com/cloud/api/ApiResponseHelper.java:
##########
@@ -1886,6 +1886,9 @@ public SystemVmResponse 
createSystemVmResponse(VirtualMachine vm) {
                         
vmResponse.setLinkLocalIp(singleNicProfile.getIPv4Address());
                         
vmResponse.setLinkLocalMacAddress(singleNicProfile.getMacAddress());
                         
vmResponse.setLinkLocalNetmask(singleNicProfile.getIPv4Netmask());
+                        if (singleNicProfile.getMacAddress() != null) {
+                            
vmResponse.setLinkLocalIp6(NetUtils.ipv6LinkLocal(singleNicProfile.getMacAddress()).toString());

Review Comment:
   this is calculated from the mac, it never checks the vm actually has the 
address. so the field always shows something even when ipv6 is off on the 
systemvm.
   
   on my lab both systemvms reported a `linklocalip6` while nothing was 
listening on it.
   
   is that the intent, a value you can always compute? if so maybe say so in 
the field description, otherwise someone will read it as "this address works".
   



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