Closed GoogleCodeExporter closed 9 years ago
that's the behavior of __iter__. Are you suggesting that we just detect if we
have an rfc3021 or rfc6164 address and use that in place of the normal
iterhosts?
Original comment by pmo...@google.com
on 17 May 2011 at 3:13
[deleted comment]
wow, unintelligible reply, sorry.
what I meant to say was, "that's the expected behavior of iterhosts. Are you
suggesting we detect if we have an rfc3021 or rfc6164 addr and use __iter__ in
place of iterhosts?"
Original comment by pmo...@google.com
on 17 May 2011 at 3:44
Yes, pretty much.
Just keeps getting host addresses from a network consistent for all block sizes.
Original comment by hi...@google.com
on 17 May 2011 at 3:59
check http://codereview.appspot.com/4523073/ and let me know if it does what
you want. I'm not convinced that this is the right thing to do; it seems like
we're presuming something which, while is usually the case (that a /31 means
two hosts), isn't always the case.
Original comment by pmo...@google.com
on 17 May 2011 at 4:08
>>> a = ipaddr.IPNetwork('2.0.0.0/31')
>>> list(a.iterhosts())
[IPv4Address('2.0.0.0'), IPv4Address('2.0.0.1')]
>>> a = ipaddr.IPNetwork('1::/127')
>>> list(a.iterhosts())
[IPv6Address('1::'), IPv6Address('1::1')]
Looks correct - I understand that feeling. Everything was nice and happy until
those RFC's as far as there were no exceptions to the rule on how subnets
worked...
Original comment by hi...@google.com
on 17 May 2011 at 4:13
fixed in r236
Original comment by pmo...@google.com
on 24 Nov 2011 at 9:29
Original issue reported on code.google.com by
hi...@google.com
on 16 May 2011 at 6:55