Fix another bug

This commit is contained in:
Tom Eastep 2010-12-21 17:50:35 -08:00
parent f3abf56cac
commit e52feb7da7

View File

@ -305,6 +305,8 @@ sub process_actions1() {
push_open( $actionfile ); push_open( $actionfile );
my $actiontype = 0;
while ( read_a_line ) { while ( read_a_line ) {
my ($wholetarget, @rest ) = split_line1 1, 13, 'action file' , $rule_commands; my ($wholetarget, @rest ) = split_line1 1, 13, 'action file' , $rule_commands;
@ -313,28 +315,28 @@ sub process_actions1() {
# deals with the target and the parameter. We pass undef for the rest so we'll # deals with the target and the parameter. We pass undef for the rest so we'll
# know if we try to use one of them. # know if we try to use one of them.
# #
process_rule_common( $action , $actiontype |= process_rule_common( $action ,
$wholetarget , $wholetarget ,
'' , # Current Param '' , # Current Param
undef, # source undef, # source
undef, # dest undef, # dest
undef, # proto undef, # proto
undef, # ports undef, # ports
undef, # sports undef, # sports
undef, # origdest undef, # origdest
undef, # ratelimit undef, # ratelimit
undef, # user undef, # user
undef, # mark undef, # mark
undef, # connlimit undef, # connlimit
undef, # time undef, # time
undef, # headers undef, # headers
undef # wildcard undef # wildcard
) unless $wholetarget eq 'FORMAT' || $wholetarget eq 'COMMENT'; ) unless $wholetarget eq 'FORMAT' || $wholetarget eq 'COMMENT';
} }
pop_open; pop_open;
$targets{$action} |= ACTION; $targets{$action} = ACTION | $actiontype;
} }
} }
} }
@ -829,17 +831,12 @@ sub process_rule_common ( $$$$$$$$$$$$$$$$ ) {
} }
} }
} }
if ( $inaction1 ) { #
# # Return the NAT-oriented flags to the caller who will eventually add them
# We need to transfer the NAT-oriented flags to the action itself # to $targets{$inaction1}
# #
$targets{$inaction1} |= ( $actiontype & ( NATRULE | NONAT | NATONLY ) ); return ( $actiontype & ( NATRULE | NONAT | NATONLY ) ) if $inaction1;
#
# That's all for the first pass
#
return 1;
}
# #
# Take care of irregular syntax and targets # Take care of irregular syntax and targets