Bug#838274: libnetaddr-ip-perl: Parses number - version() == 4 - prints v6

Florian Lohoff f at zz.de
Mon Sep 19 10:34:19 UTC 2016


Package: libnetaddr-ip-perl
Version: 4.075+dfsg-1+b1

Hi,
suddenly some DNS zones of ours went belly up because a user
succeeded in entering a pure number. It got parsed from NetAddr::IP
which said by ->version() it to be a v4 address but printing it 
returned a v6 address:

$ perl -MNetAddr::IP -e '$a=new NetAddr::IP('9000092018'); print $a->version(). "\n"; print $a . "\n"'
4
0:0:0:0:0:2:1872:8172/128

This is pretty unexpected. I would have thought that parsing would
return an "undef".

Flo
-- 
Florian Lohoff                                                 f at zz.de
             UTF-8 Test: The 🐈 ran after a 🐁, but the 🐁 ran away
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20160919/f5f7cb85/attachment.sig>


More information about the pkg-perl-maintainers mailing list