IPv6 inaccuracies
Opened this issue · 2 comments
There are three details that are not correct:
-
The comment of lastAddress for an IPv6 address says, this usually is a broadcast address. IPv6 does not have a broadcast, the doc should either reflect that or remove this comment to avoid ill informing users.
-
endAddressExclusive it will not respect the 128 anycast addresses at the top
-
endAddressExclusive it claims the broadcast address exists, correct is also the last address is valid.
thanks for reporting @wzrdtales, for 2. and 3. can you be more explicit so I understand what needs to change?
Sure, according to the official Standard (https://www.rfc-editor.org/rfc/rfc2526.html), IPv6 does not have a broadcast address. The library says the last address is invalid, this is not true it is a valid address, but it is also a reserved anycast address.
Further, the last 128 addresses in an ipv6 subnet, are reserved anycast addresses, they can't be utilized as unicast and therefor should not be returned in endAddressExclusive