h0arry / ipaddr-py

Automatically exported from code.google.com/p/ipaddr-py
0 stars 0 forks source link

Wrong IPv6 generation #114

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
:CODE:
ipv6 = "20:190::1:0/64"
net6 = ipaddr.IPv6Network(ipv6)

print net6
range6 = net6.iterhosts()

print range6.next()
print range6.next()
print range6.next()

What is the expected output? What do you see instead?
:RECEIVED OUTPUT:
20:190::1:0/64
20:190::1
20:190::2
20:190::3
:EXPECTED:
20:190::1:0/64
20:190::1:1
20:190::1:2
20:190::1:3

What version of the product are you using? On what operating system?
Module version 2.1.11, Windows 7, Python 2.7

Please provide any additional information below.

Original issue reported on code.google.com by atra...@gmail.com on 3 Apr 2015 at 6:15

GoogleCodeExporter commented 9 years ago
the issue is that "20:190::1:0/64" has host bits set and iterhosts() starts 
iterating from the network address.

Original comment by peter.mo...@gmail.com on 11 Apr 2015 at 11:21