"fe80:6666:6666:6666:6666:6666:6666:6666" is not a valid IPv6 link-local address
Open
Nobody has claimed this yet.
stdlib
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
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
Linked PRs
- gh-155384
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the IPv6Address example and inspecting the is_link_local behavior in the ipaddress implementation. Compare the result with RFC 4291 section 2.5.6 and add or update tests for the fe80::/64 requirement. Done means the supplied address is no longer reported as link-local while valid addresses remain so; linked PR gh-155384 indicates work is already underway.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100