Another fix for NONE policy plus fix broken matrix generation in 6468

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6469 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-06-06 13:49:30 +00:00
parent a8cb589333
commit 40f3593f69
2 changed files with 8 additions and 9 deletions

View File

@ -245,14 +245,13 @@ sub validate_policy()
sub policy_rules( $$$$ ) {
my ( $chainref , $target, $loglevel, $default ) = @_;
unless ( $target eq 'NONE' ) {
add_rule $chainref, "-j $default" if $default && $default ne 'none';
log_rule $loglevel , $chainref , $target , '' if $loglevel ne '';
fatal_error "Null target in policy_rules()" unless $target;
add_rule $chainref , ( '-j ' . ( $target eq 'REJECT' ? 'reject' : $target ) ) unless $target eq 'CONTINUE';
}
}
sub report_syn_flood_protection() {
progress_message ' Enabled SYN flood protection';

View File

@ -1726,7 +1726,7 @@ sub generate_matrix() {
#
add_rule(
$chain3ref ,
join( '', match_dest_dev($interface), match_source_net($net), match_dest_net($net1), $ipsec_out_match, "-j $chain" )
join( '', match_dest_dev($interface1), match_source_net($net), match_dest_net($net1), $ipsec_out_match, "-j $chain" )
);
}
}