summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-07-19 09:37:52 -0400
committerjim-p <jimp@pfsense.org>2013-07-19 09:39:38 -0400
commit8e088ea50a4ad4b012cd5e8c42a5754c917a409b (patch)
treedb34e9e78683f480471e64ce1dbb303465fa4bc7 /etc
parent166fc3cdf01a1c3e37ad2e7460e04e7aff29e1ce (diff)
downloadpfsense-8e088ea50a4ad4b012cd5e8c42a5754c917a409b.zip
pfsense-8e088ea50a4ad4b012cd5e8c42a5754c917a409b.tar.gz
Handle IPv6 in ip_in_interface_alias_subnet()
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 6abb527..e8a7a58 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -4452,7 +4452,8 @@ function ip_in_interface_alias_subnet($interface, $ipalias) {
case "ipalias":
if ($vip['interface'] <> $interface)
break;
- if (ip_in_subnet($ipalias, gen_subnet($vip['subnet'], $vip['subnet_bits']) . "/" . $vip['subnet_bits']))
+ $subnet = is_ipaddrv6($ipalias) ? gen_subnetv6($vip['subnet'], $vip['subnet_bits']) : gen_subnet($vip['subnet'], $vip['subnet_bits']);
+ if (ip_in_subnet($ipalias, $subnet . "/" . $vip['subnet_bits']))
return true;
break;
}
OpenPOWER on IntegriCloud