summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_aliases_import.php
diff options
context:
space:
mode:
authorphildd <ict.advisor@nepal.inf.org>2013-12-29 08:05:53 -0800
committerphildd <ict.advisor@nepal.inf.org>2013-12-29 08:05:53 -0800
commit54e81df0d3d6f1650c0bde8b74f583f4c0b40488 (patch)
treee7fa780e719d31389b3e850596b7a376bbe65a32 /usr/local/www/firewall_aliases_import.php
parent5a89049022022e98f745ccb1eba51b7f438f6fe7 (diff)
downloadpfsense-54e81df0d3d6f1650c0bde8b74f583f4c0b40488.zip
pfsense-54e81df0d3d6f1650c0bde8b74f583f4c0b40488.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/local/www/firewall_aliases_import.php')
-rwxr-xr-xusr/local/www/firewall_aliases_import.php4
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 26e5e2d..bb3218a 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)) {
OpenPOWER on IntegriCloud