Skip to content

Commit

Permalink
Update IsIPv6ULA
Browse files Browse the repository at this point in the history
Per spec https://datatracker.ietf.org/doc/html/rfc4193#section-3.1

fc/7 prefixes are local addresses, fe/8 uses a specific method and address format, but fc/8 is still a unique local address block, just with an undefined format
  • Loading branch information
achaulk-goog authored Apr 5, 2024
1 parent 11da2b1 commit e65f3df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inet/IPAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ bool IPAddress::IsIPv6GlobalUnicast() const
// Is address an IPv6 Unique Local Address?
bool IPAddress::IsIPv6ULA() const
{
return (ntohl(Addr[0]) & 0xFF000000U) == 0xFD000000U;
return (ntohl(Addr[0]) & 0xFE000000U) == 0xFC000000U;
}

// Is address an IPv6 Link-local Address?
Expand Down

0 comments on commit e65f3df

Please sign in to comment.