libnetwork icon indicating copy to clipboard operation
libnetwork copied to clipboard

bitseq: invalid bit range on IPv6

Open houstar opened this issue 7 years ago • 4 comments

This issue occurred during append IPAMV6Conf to IPAMConf struct to automatic allocate IPv6 address as follows:

invalid bit range [0, 18446744073709551615]

FILE: bitseq/sequence.go

houstar avatar Nov 07 '18 02:11 houstar

Also running into this: Steps to reproduce:

docker network create -d macvlan --subnet=10.11.22.00/24 --gateway 10.11.22.33 --ip-range=10.11.22.128/25 --ipv6 --subnet fd00::/10 --gateway fd00::aaaa:bbbb:cccc:dddd --ip-range=fd00:d0cc:a::/64 -o parent=enp1s0 lan
docker run --rm --network lan alpine
docker: Error response from daemon: invalid bit range [0, 18446744073709551615].

FWIW, this works:

docker network create -d macvlan --subnet=10.11.22.00/24 --gateway 10.11.22.33 --ip-range=10.11.22.128/25 --ipv6 --subnet fd00::/10 --gateway fd00::aaaa:bbbb:cccc:dddd --ip-range=fd00:d0cc:a::/72 -o parent=enp1s0 lan
docker run --rm --network lan alpine
docker: Error response from daemon: invalid bit range [0, 18446744073709551615].

I believe the underlying issue is that uint64's are used in bitseq.go, which can not represent the 128 bit ranges of an ipv6 network.

fabianfreyer avatar Nov 22 '20 21:11 fabianfreyer

Nearly 3 years later and I still can't use "--ip-range" in combination with ipv6. Is it that hard to fix?

mmomper avatar Aug 16 '21 08:08 mmomper

Make it 4 years now

ilium007 avatar Jul 10 '22 13:07 ilium007

4 years and 3 days!

kristof-mattei avatar Nov 10 '22 01:11 kristof-mattei