mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 19:30:44 +01:00
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:
parent
72544d54f0
commit
f5d9097817
@ -139,7 +139,8 @@ sub find_hosts_by_option( $ ) {
|
|||||||
while ( my ($type, $interfaceref) = each %{$zones{$zone}{hosts}} ) {
|
while ( my ($type, $interfaceref) = each %{$zones{$zone}{hosts}} ) {
|
||||||
while ( my ( $interface, $arrayref) = ( each %{$interfaceref} ) ) {
|
while ( my ( $interface, $arrayref) = ( each %{$interfaceref} ) ) {
|
||||||
for my $host ( @{$arrayref} ) {
|
for my $host ( @{$arrayref} ) {
|
||||||
if ( $host->{options}{$option} ) {
|
my $optionsref = $host->{options};
|
||||||
|
if ( $optionsref && $optionsref->{$option} ) {
|
||||||
for my $net ( @{$host->{hosts}} ) {
|
for my $net ( @{$host->{hosts}} ) {
|
||||||
push @hosts, [ $interface, $type eq 'ipsec4' ? 'ipsec' : 'none' , $net ];
|
push @hosts, [ $interface, $type eq 'ipsec4' ? 'ipsec' : 'none' , $net ];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user