Skip to content

"fe80:6666:6666:6666:6666:6666:6666:6666" is not a valid IPv6 link-local address #155140

Description

@lbaumbauer

Bug description:

>>> import ipaddress
>>> ipaddress.IPv6Address("fe80:6666:6666:6666:6666:6666:6666:6666").is_link_local
True

The spec says there must be 54 bits of zero.
the address must be within fe80::/64, not merely within fe80::/10.
2.5.6. Link-Local IPv6 Unicast Addresses

   Link-Local addresses are for use on a single link.  Link-Local
   addresses have the following format:

   |   10     |
   |  bits    |         54 bits         |          64 bits           |
   +----------+-------------------------+----------------------------+
   |1111111010|           0             |       interface ID         |
   +----------+-------------------------+----------------------------+

CPython versions tested on:

3.13

Operating systems tested on:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions