Another look at DNAT/REDIRECT and nested zones

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8051 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2008-01-12 21:11:39 +00:00
parent 755983b38c
commit 88a74e40f3
2 changed files with 4 additions and 2 deletions

View File

@ -1598,7 +1598,7 @@ sub generate_matrix() {
add_rule $preroutingref, $_ for ( @returnstack );
@returnstack = ();
add_rule $preroutingref, join( '', match_source_dev( $interface), $source, $ipsec_in_match, '-j ', $chainref->{name} );
push @returnstack, join( '', match_source_dev( $interface), $source, $ipsec_in_match, '-j RETURN' ) unless $filter_table->{"${zone}2${fw}"}->{policy} eq 'CONTINUE';
push @returnstack, join( '', match_source_dev( $interface), $source, $ipsec_in_match, '-j RETURN' ) if $zoneref->{options}{nested};
}
if ( $chain2 ) {

View File

@ -83,6 +83,7 @@ use constant { NOTHING => 'NOTHING',
#
# %zones{<zone1> => {type = > <zone type> 'firewall', 'ipv4', 'ipsec4', 'bport4';
# options => { complex => 0|1
# nested => 0|1
# in_out => < policy match string >
# in => < policy match string >
# out => < policy match string >
@ -297,7 +298,8 @@ sub determine_zones()
options => { in_out => parse_zone_option_list( $options || '', $type ) ,
in => parse_zone_option_list( $in_options || '', $type ) ,
out => parse_zone_option_list( $out_options || '', $type ) ,
complex => ($type eq 'ipsec4' || $options || $in_options || $out_options ? 1 : 0) } ,
complex => ($type eq 'ipsec4' || $options || $in_options || $out_options ? 1 : 0) ,
nested => @parents > 0 } ,
interfaces => {} ,
children => [] ,
hosts => {}