summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_virtual_ip_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-02-07 09:43:57 +0000
committerErmal <eri@pfsense.org>2013-02-07 09:46:44 +0000
commit88cc00dbf56c7b900a6258a47f7f07329c2c19c8 (patch)
tree5e5867aed7f32d77ba3b48054a9cd8cfd80273dd /usr/local/www/firewall_virtual_ip_edit.php
parentd7a1532bbf016674514daa01a8bbec20848f8870 (diff)
downloadpfsense-88cc00dbf56c7b900a6258a47f7f07329c2c19c8.zip
pfsense-88cc00dbf56c7b900a6258a47f7f07329c2c19c8.tar.gz
Make gen_subnetv6 return a compressed form IPv6 address/net representation. This removes some issues reported during Ticket #2746 and solve the issue on some cases
Diffstat (limited to 'usr/local/www/firewall_virtual_ip_edit.php')
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php
index d208dd3..8682d5e 100755
--- a/usr/local/www/firewall_virtual_ip_edit.php
+++ b/usr/local/www/firewall_virtual_ip_edit.php
@@ -167,7 +167,7 @@ if ($_POST) {
$parent_ip = get_interface_ipv6($_POST['interface']);
$parent_sn = get_interface_subnetv6($_POST['interface']);
$subnet = gen_subnetv6($parent_ip, $parent_sn);
- if (!ip_in_subnet($_POST['subnet'], gen_subnetv6($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['interface'], $_POST['subnet'])) {
+ if (!ip_in_subnet($_POST['subnet'], "{$subnet}/{$parent_sn}") && !ip_in_interface_alias_subnet($_POST['interface'], $_POST['subnet'])) {
$cannot_find = $_POST['subnet'] . "/" . $_POST['subnet_bits'] ;
$input_errors[] = sprintf(gettext("Sorry, we could not locate an interface with a matching subnet for %s. Please add an IP alias in this subnet on this interface."),$cannot_find);
}
OpenPOWER on IntegriCloud