Revision 2f87470c
Added by Luiz Souza over 7 years ago
src/etc/inc/util.inc | ||
---|---|---|
649 | 649 |
if (!is_string($ipaddr) || empty($ipaddr)) { |
650 | 650 |
return false; |
651 | 651 |
} |
652 |
/* |
|
653 |
* While Net_IPv6::checkIPv6() considers IPv6/mask a valid IPv6, |
|
654 |
* is_ipaddrv6() needs to be more strict to keep the compatibility |
|
655 |
* with is_ipaddrv4(). |
|
656 |
*/ |
|
657 |
if (strstr($ipaddr, "/")) { |
|
658 |
return false; |
|
659 |
} |
|
652 | 660 |
if (strstr($ipaddr, "%") && is_linklocal($ipaddr)) { |
653 | 661 |
$tmpip = explode("%", $ipaddr); |
654 | 662 |
$ipaddr = $tmpip[0]; |
Also available in: Unified diff
Make is_ipaddrv6() compatible with is_ipaddrv4().
Only the IP address must be accepted, address with netmasks do not qualify.
Ticket #8024