diff options
author | Ermal <eri@pfsense.org> | 2013-02-07 09:43:57 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-07 09:46:44 +0000 |
commit | 88cc00dbf56c7b900a6258a47f7f07329c2c19c8 (patch) | |
tree | 5e5867aed7f32d77ba3b48054a9cd8cfd80273dd /usr/local | |
parent | d7a1532bbf016674514daa01a8bbec20848f8870 (diff) | |
download | pfsense-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')
-rwxr-xr-x | usr/local/www/firewall_virtual_ip_edit.php | 2 | ||||
-rwxr-xr-x | usr/local/www/system_routes_edit.php | 2 |
2 files changed, 2 insertions, 2 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); } diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php index 98e264b..1a27e88 100755 --- a/usr/local/www/system_routes_edit.php +++ b/usr/local/www/system_routes_edit.php @@ -110,7 +110,7 @@ if ($_POST) { $current_targets = get_staticroutes(true); $new_targets = array(); if(is_ipaddrv6($_POST['network'])) { - $osn = Net_IPv6::compress(gen_subnetv6($_POST['network'], $_POST['network_subnet'])) . "/" . $_POST['network_subnet']; + $osn = gen_subnetv6($_POST['network'], $_POST['network_subnet']) . "/" . $_POST['network_subnet']; $new_targets[] = $osn; } if (is_ipaddrv4($_POST['network'])) { |