Thomas Monjalon, Nov 19, 2025 at 01:27: > After checking with Stephen, it appears that XOR is really desired. > This bit must be inverted, so 0 is local and 1 is universal. > > Adding this comment in the code to avoid confusion in future: > /* > * The "u" bit (universal/local bit in IEEE EUI-64 terminology) > * must be inverted for IPv6 link local address. > * 0 means local scope, 1 means universal scope. > */ > > Applied, thanks.
Thanks Thomas. That XOR is described in the RFCs as "flipping the 'u' bit". I.e. the bit should be 1 if the address is "global/universal" and 0 if the address is "local/administratively configured". Here's the corresponding code in Linux and BSD: https://github.com/torvalds/linux/blob/v6.17/include/net/addrconf.h#L201 https://github.com/freebsd/freebsd-src/blob/release/14.3.0/sys/netinet6/in6_ifattach.c#L97 -- Robin > No animals were injured.

