rhtyd commented on a change in pull request #3136: ipv6: Do not allow Secondary
IPv6 addresses to be EUI-64
URL: https://github.com/apache/cloudstack/pull/3136#discussion_r249251498
##########
File path: utils/src/main/java/com/cloud/utils/net/NetUtils.java
##########
@@ -1582,6 +1582,15 @@ public static IPv6Address ipv6LinkLocal(final String
macAddress) {
return EUI64Address(IPv6Network.LINK_LOCAL_NETWORK, macAddress);
}
+ public static boolean isIPv6EUI64(final IPv6Address address) {
+ byte[] bytes = address.toByteArray();
+ return (bytes[11] == -1 && bytes[12] == -2);
Review comment:
@wido Can you add some docs/comments around the magic code?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services