Skip Menu |

This queue is for tickets about the Net-IPv6Addr CPAN distribution.

Report information
The Basics
Id: 132826
Status: resolved
Priority: 0/
Queue: Net-IPv6Addr

People
Owner: bkb [...] cpan.org
Requestors: blues [...] pld-linux.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Net::IPv6Addr detection bug
Date: Tue, 16 Jun 2020 16:27:48 +0200
To: bug-Net-IPv6Addr [...] rt.cpan.org
From: Paweł Gołaszewski <blues [...] pld-linux.org>
I found problem with Net::IPv6Addr Please see script from attachment. The result on my Debian Buster is: 1: FortyGigabitEthernet1/0/100 jest ipv6 2: fortygigabitethernet1/0/100 jest ipv6 The result should be empty, for sure. My system: $ cat /etc/debian_version 10.2 $ dpkg -l | grep ipv6 ii libnet-ipv6addr-perl 0.96-1 $ perl --version This is perl 5, version 28, subversion 1 (v5.28.1) built for x86_64-linux-gnu- thread-multi (with 61 registered patches, see perl -V for more detail) Can you fix it? -- Paweł Gołaszewski <p.golaszewski@task.gda.pl>

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #132826] Net::IPv6Addr detection bug
Date: Wed, 17 Jun 2020 09:08:25 +0900
To: bug-Net-IPv6Addr [...] rt.cpan.org
From: Ben Bullock <benkasminbullock [...] gmail.com>
Hi Pawel, thanks for the bug report. It seems to be a combination of two things, first of all the FortyGigabitEthernet1 part is valid as base 85: use Net::IPv6Addr; my $base85 = 'FortyGigabitEthernet1'; if ((Net::IPv6Addr::ipv6_parse_base85($base85))) { print "Valid base 85: $base85\n"; } prints Valid base 85 FortyGigabitEthernet1 and secondly the split statement on line 129 of IPv6Adrr.pm in the getargs function doesn't correctly detect the extra / in your address. To address these problems, I propose adding a facility to turn off the base 85 parsing, possibly on by default, and secondly adding a ",2" at the end of the above "split" statement and then checking that $pfx is a proper number. At the moment the module doesn't report what kind of match was made, it might be worth adding another function which does so. I will write again when the work is more advanced. Thank you once again for taking the time to report the bug. Ben On Tue, 16 Jun 2020 at 23:35, Paweł Gołaszewski via RT < bug-Net-IPv6Addr@rt.cpan.org> wrote: Show quoted text
> Tue Jun 16 10:35:50 2020: Request 132826 was acted upon. > Transaction: Ticket created by blues@pld-linux.org > Queue: Net-IPv6Addr > Subject: Net::IPv6Addr detection bug > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: blues@pld-linux.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=132826 > > > > I found problem with Net::IPv6Addr > > Please see script from attachment. > > The result on my Debian Buster is: > 1: FortyGigabitEthernet1/0/100 jest ipv6 > 2: fortygigabitethernet1/0/100 jest ipv6 > > The result should be empty, for sure. > > > My system: > > $ cat /etc/debian_version > 10.2 > > $ dpkg -l | grep ipv6 > ii libnet-ipv6addr-perl 0.96-1 > > $ perl --version > > This is perl 5, version 28, subversion 1 (v5.28.1) built for > x86_64-linux-gnu- > thread-multi > (with 61 registered patches, see perl -V for more detail) > > > > Can you fix it? > > > -- > Paweł Gołaszewski <p.golaszewski@task.gda.pl> > >
It looks like the detection of the base 85 addresses was loose in more ways than one. As far as I can see from the RFC the base 85 address should be exactly 20 characters long (it is just an April Fool's joke so it is not really properly specified). If we restrict the address to 20 characters that solves the problem. I think what I'll do is to restrict to exactly twenty characters as well as doing more checking work after the split, and stop this April Fool joke from causing any more trouble. I'm also thinking of giving the version 1.00 for the next version, since the version numbers are getting a little too crowded, and this new version would mostly disable the base 85 addresses.
This issue should be resolved in version 1.0, released to CPAN just now.