diff options
author | phildd <ict.advisor@nepal.inf.org> | 2013-12-29 08:05:53 -0800 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-12-30 09:23:17 +0000 |
commit | d564ed2426621eabf7228dc7304bbaa486aaca39 (patch) | |
tree | 42adc1f3bae7b36f84dd8f3d7ec9a8ae07d0249d /usr | |
parent | d68494e6ed6038d632738a8775dfc598f46d71e0 (diff) | |
download | pfsense-d564ed2426621eabf7228dc7304bbaa486aaca39.zip pfsense-d564ed2426621eabf7228dc7304bbaa486aaca39.tar.gz |
Validate IP address ranges correctly on Alias Bulk Import
The code was there to attempt to validate and implement IP address range lines in Alias Bulk Import e.g.
10.20.0.0-10.21.22.0
should produce a bunch of smaller ranges with appropriate CIDRs.
This fixes the code so IP address ranges actually make it through into the resulting Alias.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_aliases_import.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/firewall_aliases_import.php b/usr/local/www/firewall_aliases_import.php index 9b9d735..b210003 100755 --- a/usr/local/www/firewall_aliases_import.php +++ b/usr/local/www/firewall_aliases_import.php @@ -1,7 +1,7 @@ <?php /* $Id$ */ /* - firewall_aliases_edit.php + firewall_aliases_import.php Copyright (C) 2005 Scott Ullrich All rights reserved. @@ -89,7 +89,7 @@ if($_POST['aliasimport'] <> "") { if (is_iprange($impip)) { list($startip, $endip) = explode('-', $impip); $rangesubnets = ip_range_to_subnet_array($startip, $endip); - $address .= implode(" ", $rangesubnets); + $imported = array_merge($imported, $rangesubnets); } else if (!is_ipaddr($impip) && !is_subnet($impip) && !empty($impip)) { $input_errors[] = sprintf(gettext("%s is not an IP address. Please correct the error to continue"), $impip); } elseif (!empty($impip)) { |