Fix some more bugs with hosts file handling

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6259 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-06 22:26:50 +00:00
parent f5d9097817
commit bc40507b80

View File

@ -1415,9 +1415,12 @@ sub generate_matrix() {
if ( $capabilities{POLICY_MATCH} ) {
my $type = $zoneref->{type};
my $source_ref = $zoneref->{hosts}{ipsec} || [];
my $source_ref = ( $zoneref->{hosts}{ipsec} ) || {};
create_zone_dyn_chain $zone, $frwd_ref && $config{DYNAMIC_ZONES} && (@$source_ref || $type ne 'ipsec4' );
if ( $config{DYNAMIC_ZONES} ) {
no warnings;
create_zone_dyn_chain $zone, $frwd_ref if (%$source_ref || $type ne 'ipsec4' );
}
for my $interface ( keys %$source_ref ) {
my $arrayref = $source_ref->{$interface};
@ -1425,7 +1428,7 @@ sub generate_matrix() {
my $ipsec_match = match_ipsec_in $zone , $hostref;
for my $net ( @{$hostref->{hosts}} ) {
add_rule
find_chainref( 'filter' , forward_chain $interface ) ,
$filter_table->{forward_chain $interface} ,
match_source_net join( '', $net, $ipsec_match, "-j $frwd_ref->n{name}" );
}
}