Fix find_hosts_by_option() -- Take 2

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6258 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-06 18:27:41 +00:00
parent 72544d54f0
commit f5d9097817

View File

@ -139,7 +139,8 @@ sub find_hosts_by_option( $ ) {
while ( my ($type, $interfaceref) = each %{$zones{$zone}{hosts}} ) {
while ( my ( $interface, $arrayref) = ( each %{$interfaceref} ) ) {
for my $host ( @{$arrayref} ) {
if ( $host->{options}{$option} ) {
my $optionsref = $host->{options};
if ( $optionsref && $optionsref->{$option} ) {
for my $net ( @{$host->{hosts}} ) {
push @hosts, [ $interface, $type eq 'ipsec4' ? 'ipsec' : 'none' , $net ];
}