Commit 09959a95 authored by Ad Schellevis's avatar Ad Schellevis

redo range fix, thanks to @phpb-com

parent 679dd0b8
...@@ -750,8 +750,8 @@ function filter_expand_aliases($aliasname=null, $maxdepth=10, $depth=0) ...@@ -750,8 +750,8 @@ function filter_expand_aliases($aliasname=null, $maxdepth=10, $depth=0)
&& !is_port($address) && !is_portrange($address) && is_hostname($address) && !is_port($address) && !is_portrange($address) && is_hostname($address)
&& in_array($aliased['type'], array('host'))) { && in_array($aliased['type'], array('host'))) {
$response[$aliased['name']]['hostnames'][] = $address; $response[$aliased['name']]['hostnames'][] = $address;
} elseif (strpos($address, '-') !== false || strpos($address, ':') !== false) { } elseif (strpos($address, '-') !== false) {
$tmp = preg_split("/[:-]+/", $address); $tmp = explode('-', $address);
$response[$aliased['name']]['addresses'] = array_merge( $response[$aliased['name']]['addresses'] = array_merge(
$response[$aliased['name']]['addresses'], $response[$aliased['name']]['addresses'],
ip_range_to_subnet_array($tmp[0], $tmp[1]) ip_range_to_subnet_array($tmp[0], $tmp[1])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment