timmerk / ipaddr-py

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

IPv6 Netmask Problems #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
These should return the same mask. The latter is correct.

In [5]: ipaddr.IPv6Network('2607:f850:1::/48').netmask
Out[5]: IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff')

In [6]: ipaddr.IPv6Network('2607:f850:1:0::/48').netmask
Out[6]: IPv6Address('ffff:ffff:ffff::')

This also breaks 'subnet in supernet' functionality, which is how I originally 
stumbled upon this bug.

I'm at SVN revision 232 on python 2.6.5 on 64-bit Ubuntu Lucid.

Original issue reported on code.google.com by rlaa...@gmail.com on 19 Sep 2011 at 9:21

GoogleCodeExporter commented 9 years ago
I'm not seeing this on python2.6 on a mac

Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ipaddr
>>> ipaddr.IPv6Network('2607:f850:1::/48').netmask
IPv6Address('ffff:ffff:ffff::')
>>> ipaddr.IPv6Network('2607:f850:1:0::/48').netmask
IPv6Address('ffff:ffff:ffff::')

Can you check to see if this is fixed for you at r236 as well?

Original comment by pmo...@google.com on 24 Nov 2011 at 10:14

GoogleCodeExporter commented 9 years ago
please reopen this if you're still seeing an issue.

Original comment by pmo...@google.com on 29 Nov 2011 at 1:16

GoogleCodeExporter commented 9 years ago
Yes, this is fixed, at least in revision 238.

Original comment by rlaa...@gmail.com on 30 Nov 2011 at 1:02

GoogleCodeExporter commented 9 years ago
thanks for verifying.

Original comment by pmo...@google.com on 30 Nov 2011 at 1:06