summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-08-16 10:39:25 +0000
committerErmal <eri@pfsense.org>2013-08-16 10:39:25 +0000
commit93d38614553352afa2bfc2bdf737a85189e24299 (patch)
treec09018c969dae416dc02d9f2d00d244a399732d2 /etc/inc/util.inc
parentc6868a8fae2ef26288e11a588749f5f54469687c (diff)
downloadpfsense-93d38614553352afa2bfc2bdf737a85189e24299.zip
pfsense-93d38614553352afa2bfc2bdf737a85189e24299.tar.gz
Handle link local addresses with embedded interface scope on is_ipaddrv6 and also on dnsmasq which is not yet there for these addresses
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index e5ff1dd..cb75798 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -477,6 +477,10 @@ function is_ipaddr($ipaddr) {
function is_ipaddrv6($ipaddr) {
if (!is_string($ipaddr) || empty($ipaddr))
return false;
+ if (strstr($ipaddr, "%") && is_linklocal($ipaddr)) {
+ $tmpip = explode("%", $ipaddr);
+ $ipaddr = $tmpip[0];
+ }
return Net_IPv6::checkIPv6($ipaddr);
}
OpenPOWER on IntegriCloud