summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-10-23 12:24:58 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-10-23 12:24:58 -0200
commit095707fe9e5cdbfaff673f21b237094a5b8d5297 (patch)
tree5c35469801b7632ddd45e9514ac6516f2fce56fb /etc
parentc25d1fd7e5c5d8e147977ef99c6005be71ee6d72 (diff)
parent99ba943ad480a197441d3b1a241c213a8ccd9a00 (diff)
downloadpfsense-095707fe9e5cdbfaff673f21b237094a5b8d5297.zip
pfsense-095707fe9e5cdbfaff673f21b237094a5b8d5297.tar.gz
Merge pull request #1313 from phil-davis/patch-9
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/util.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index c3ec285..b134be0 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -434,6 +434,13 @@ function ip_range_to_subnet_array($startip, $endip) {
return array();
}
+ if (ip_greater_than($startip, $endip)) {
+ // Swap start and end so we can process sensibly.
+ $temp = $startip;
+ $startip = $endip;
+ $endip = $temp;
+ }
+
// Container for subnets within this range.
$rangesubnets = array();
@@ -473,7 +480,7 @@ function ip_range_to_subnet_array($startip, $endip) {
}
}
- // Some logic that will recursivly search from $startip to the first IP before the start of the subnet we just found.
+ // Some logic that will recursively search from $startip to the first IP before the start of the subnet we just found.
// NOTE: This may never be hit, the way the above algo turned out, but is left for completeness.
if ($startip != $targetsub_min) {
$rangesubnets = array_merge($rangesubnets, ip_range_to_subnet_array($startip, ip_before($targetsub_min)));
OpenPOWER on IntegriCloud