diff --git a/Shorewall-perl/Shorewall/Hosts.pm b/Shorewall-perl/Shorewall/Hosts.pm index 0955ea20b..583bcb354 100644 --- a/Shorewall-perl/Shorewall/Hosts.pm +++ b/Shorewall-perl/Shorewall/Hosts.pm @@ -72,7 +72,7 @@ sub validate_hosts_file() my $interface; - if ( $hosts =~ /^([\w.@%-]+):(.*)$/ ) { + if ( $hosts =~ /^([\w.@%-]+\+?):(.*)$/ ) { $interface = $1; $hosts = $2; $zoneref->{options}{complex} = 1 if $hosts =~ /^\+/; @@ -103,9 +103,7 @@ sub validate_hosts_file() $optionsref = \%options; } - my @h = split ',', $hosts; - - add_group_to_zone( $zone, $type , $interface, \@h , $optionsref); + add_group_to_zone( $zone, $type , $interface, [ split ',', $hosts ] , $optionsref); progress_message " Host \"$line\" validated"; }