Hi, I'm testing IPv6 stable-secret identifiers SII under Linux RFC 7217. <https://tools.ietf.org/html/rfc7217>
One important feature of RFC 7217 is to deliver stable IPv6 addresses for server addressing use that will not change in case of new network hardware (changed hardware address). Besides other benefits of SII, this is an important feature compared with EUI64 IPv6 addresses. However during my testing, the SII addresses were always changing when changing the network hardware address. After investigating into NetworkManager (Red Hat), wicked (SUSE) and disabling all these, working with the kernel alone and sysctl values, the issue was still showing. I'm not a C programmer, but I took a look into the source code and in linux-4.20.6/net/ipv6/addrconf.c I found: [...] sha_init(digest); memset(&data, 0, sizeof(data)); memset(workspace, 0, sizeof(workspace)); ---> memcpy(data.hwaddr, idev->dev->perm_addr, idev->dev->addr_len); data.prefix[0] = address->s6_addr32[0]; data.prefix[1] = address->s6_addr32[1]; data.secret = secret; data.dad_count = dad_count; sha_transform(digest, data.__data, workspace); temp = *address; temp.s6_addr32[2] = (__force __be32)digest[0]; temp.s6_addr32[3] = (__force __be32)digest[1]; [...] The marked line looks to me as if the interface hardware address is mixed into the SHA hash that will generate the SII address. Is this an correct observation? If yes, what is the rationale for this? If my suspected behavior of the Linux kernel is the true, it does really reduce the usefulness of IPv6 SII addresses in datacenter/enterprise environments. Best regards Carsten Strotmann