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>
>
>