[Python-modules-team] Bug#460234: check_addr_prefixlen exposes bug in net()/broadcast()/overlaps() methods

martin f krafft madduck at debian.org
Fri Jan 11 12:59:55 UTC 2008


retitle 460234 check_addr_prefixlen exposes bug in net() method
thanks

I didn't see http://pypi.python.org/pypi/IPy/0.55 but was looking at
old documentation. IPy has a global option,
IPy.check_addr_prefixlen, which, if False, allows for "uncommon"
prefixes. Now, IP('172.30.1.14/22') seems to work.

However, now the net() and broadcast() methods return garbage:

In [50]: IP('172.30.1.14/22').net()
Out[50]: IP('172.30.1.14')

In [51]: IP('172.30.1.14/22').broadcast()
Out[51]: IP('172.30.5.13')

When in fact the addresses should be 172.30.0.0 and 172.30.3.255.

This works, but prevents me from saving the prefix length with the IP.

In [63]: IP('172.30.1.14').make_net(22)
Out[63]: IP('172.30.0.0/22')

Also,

IP('172.30.1.14/22').overlaps('127.30.0.50/24') == 0

which is wrong.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.23-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-ipy depends on:
ii  python                        2.4.4-6    An interactive high-level object-o
ii  python-support                0.7.6      automated rebuilding support for p

python-ipy recommends no packages.

-- no debconf information


-- 
 .''`.   martin f. krafft <madduck at debian.org>
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20080111/306341c7/attachment.pgp 


More information about the Python-modules-team mailing list