CC: | "amcheste [...] gmail.com" <amcheste [...] gmail.com> |
Subject: | is_ipv6 Bug when address ends with :: |
Date: | Wed, 30 Jun 2010 16:21:45 -0400 |
To: | "bug-Data-Validate-IP [...] rt.cpan.org" <bug-Data-Validate-IP [...] rt.cpan.org> |
From: | "Chester, Alan" <Alan.Chester [...] tekelec.com> |
Hello,
When running the function is_ipv6 I ran into issues with it validating an IPv6 address which ends with double colon(::). An example would be 2001:: fails even though this is a valid IPv6 address. I did some investigation and its because split removes trailing null characters. This makes the test think that there is no empty chunk and less then 8 octets so it thinks this is not a valid IP address.
I have made a patch for this so I can continue my development however I was wondering what is your recommended solution? I have attached my patch as a reference.
Here is some information on what I am running:
Data-Validate-IP-0.11
5.8.8
Linux 2.6.18-164.11.1.el5
Thanks,
Alan
Alan Chester
Linux Dist. Dev, TPD/GPS
(o) +1.919.461.6833 | (m) +1.828.308.1105
5200 Paramount Pky | Morrisville, NC | 27612 | USA
Tekelec<http://www.tekelec.com/?rdid=518> | SIP Blog<http://www.tekelec.com/rd/?rdid=519>
Message body is not shown because sender requested not to inline it.