can't set gateway with ipv6 address with all one host bit
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
# docker network create -d macvlan \
--ipv6 \
--subnet=fd6d:1111:2222::/64 \
--gateway=fd6d:1111:2222::ffff:ffff:ffff:ffff \
-o parent=eth1.2 \
macvlan.2
Error response from daemon: failed to allocate gateway (fd6d:1111:2222::ffff:ffff:ffff:ffff): bit does not belong to the sequence
This error is generated by https://github.com/docker/libnetwork/blob/master/bitseq/sequence.go#L389 called by https://github.com/docker/libnetwork/blob/master/ipam/allocator.go#L586 .
IPv6 address with all host bits set to one is valid address, while in case of ipv4, address with all host bits set to one is broadcast address.
Contributor guide
No contributing guide indexed for this repository
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 Docker network create command, then read bitseq/sequence.go around line 389 and ipam/allocator.go around line 586. Confirm the expected handling of an IPv6 gateway with all host bits set to one, while preserving the existing IPv4 behavior; done means the reported command no longer returns the sequence error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100