Bug#601601: spamassassin: cannot include 0:0:0:0:0:0:0:1/128 as it has already been included

Justin Mason jm at jmason.org
Fri Oct 29 13:31:15 UTC 2010


hi guys, it's a NetAddr::IP regression.   Mark Martinec said (on the
SA users list):

> Looks like a but in NetAddr::IP 4.034, it forgets to adjust the > CIDR mask
> when converting an IPv4 address to an IPv6 notation:
>
> correct (NetAddr-IP-4.033):
>  $ perl -le 'use NetAddr::IP; print NetAddr::IP->new6("127.0.0.0/8")'
> 0:0:0:0:0:0:7F00:0/104
>
> wrong (NetAddr-IP-4.034):
>  $ perl -le 'use NetAddr::IP; print NetAddr::IP->new6("127.0.0.0/8")'
> 0:0:0:0:0:0:7F00:0/8


upstream: https://rt.cpan.org/Public/Bug/Display.html?id=62521

hth,

--j.


On Fri, Oct 29, 2010 at 07:48, Noah Meyerhans <noahm at debian.org> wrote:
> reassign 601601 libnetaddr-ip-perl
> retitle 601601 NetAddr::IP->new6 fails to adjust netmask when mapping a v4 address
> thanks
>
> Something within libnetaddr-ip-perl perl changed between version
> 4.028+dfsg-1 (currently in squeeze) and version 4.034+dfsg-1 (currently
> in sid).  Consider the attached perl program.  The
> _convert_ipv4_cidr_to_ipv6 function is pulled from spamassassin's
> Mail::SpamAssassin::NetSet module.  On a squeeze system, the program
> outputs the following:
>
> Loopback network: 127.0.0.0/8
> converted to v6 mapped: 0:0:0:0:0:FFFF:7F00:0/104
> IPv6 loopback address: 0:0:0:0:0:0:0:1/128
> Is 0:0:0:0:0:0:0:1/128 contained within 0:0:0:0:0:FFFF:7F00:0/104? 0
>
> On a sid sytem, the program outputs this:
> Loopback network: 127.0.0.0/8
> converted to v6 mapped: 0:0:0:0:0:FFFF:7F00:0/8
> IPv6 loopback address: 0:0:0:0:0:0:0:1/128
> Is 0:0:0:0:0:0:0:1/128 contained within 0:0:0:0:0:FFFF:7F00:0/8? 1
>
> Note the differences in the network mask when the loopback /8 is
> mapped to a v6 address.  Note that this leads to the
> NetAddr::IP->contains method returning an incorrect value.
>
> Thanks.
> noah
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD4DBQFMym5PYrVLjBFATsMRAhiuAJiQjUHeRiH6yYnF3a2KBbsfgMJaAJ9jipmk
> 1ILZCji᭖닒컋ʒ⠛==
> =JZSb
> -----END PGP SIGNATURE-----
>
>





More information about the pkg-perl-maintainers mailing list