Subject: | is_ipv6 Bug when last chunk is an ipv4 address |
Date: | Thu, 06 Jan 2011 13:29:02 +0100 |
To: | bug-Data-Validate-IP [...] rt.cpan.org |
From: | Milan Matlak <milan.matlak [...] sde.cz> |
Hello,
When running the function is_ipv6 I ran into issues with it validating
an IPv6 address which ends with an ipv4 address chunk.
The IP ::ffff:192.1.56.10 is properly validated, but it's non shortened
format 0:0:0:0:0:ffff:192.1.56.10 is considered to be invalid.
I did some investigation and it's because the ipv4 chunk takes 4 bytes
and therefore the total number of chunks are 7 (not 8).
I have attached my patch as a reference.
Here is some information on what I am running:
Data-Validate-IP-0.12
5.8.8
Linux 2.6.18-194.17.4.el5
Thanks,
Milan
Milan Matlak
Linux Dist. Dev, TPD/GPS
Dornych 90, Brno, 61700, Czech Republic
Software Development Europe <http://www.sdeusa.com>
Message body is not shown because sender requested not to inline it.