Don't lookup standard target if target is an action, macro, or chain

This commit is contained in:
Tom Eastep 2011-01-09 10:10:27 -08:00
parent 97672455b2
commit 14c4bd99aa

View File

@ -44,7 +44,7 @@ our @EXPORT = qw(
); );
our @EXPORT_OK = qw( initialize ); our @EXPORT_OK = qw( initialize );
our $VERSION = '4.4_16'; our $VERSION = '4.4_17';
our %macros; our %macros;
@ -1020,6 +1020,7 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$ ) {
# #
my $log_action = $action; my $log_action = $action;
unless ( $actiontype & ( ACTION | MACRO | NFQ | CHAIN ) ) {
if ( my $shorewall_target = lookup_shorewall_action( $basictarget ) ) { if ( my $shorewall_target = lookup_shorewall_action( $basictarget ) ) {
if ( $shorewall_target == TGT_REDIRECT ) { if ( $shorewall_target == TGT_REDIRECT ) {
my $z = $actiontype & NATONLY ? '' : firewall_zone; my $z = $actiontype & NATONLY ? '' : firewall_zone;
@ -1048,6 +1049,7 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$ ) {
$action = join( ' ', 'SET --' . $xlate{$basictarget} , $setname , $flags ); $action = join( ' ', 'SET --' . $xlate{$basictarget} , $setname , $flags );
} }
} }
}
# #
# Isolate and validate source and destination zones # Isolate and validate source and destination zones
# #