wido commented on code in PR #13795:
URL: https://github.com/apache/cloudstack/pull/13795#discussion_r3975691086
##########
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:
The calculated address is always the same. It never changes or will be
different. This is an RFC for IPv6 where the link-local is persistent. That's
the great thing about it.
Calculate instead of store. Saves a lot of code.
--
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]