Better fix for $current_param in the INLINE block of process_rule()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-03-12 18:28:27 -08:00
parent 0e59b82503
commit 5f01bc75bd
2 changed files with 3 additions and 9 deletions

View File

@ -2949,17 +2949,13 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
$actionresult = 0; $actionresult = 0;
my $save_current_param = $current_param;
$current_param = $param;
my $generated = process_inline( $basictarget, my $generated = process_inline( $basictarget,
$chainref, $chainref,
$rule . $raw_matches, $rule . $raw_matches,
$matches1, $matches1,
$loglevel, $loglevel,
$target, $target,
$current_param, $param,
$source, $source,
$dest, $dest,
$proto, $proto,
@ -2978,8 +2974,6 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
( $actionresult, @columns ) = @{pop @columnstack}; ( $actionresult, @columns ) = @{pop @columnstack};
$current_param = $save_current_param;
$macro_nest_level--; $macro_nest_level--;
return $generated; return $generated;

View File

@ -14,12 +14,12 @@ DEFAULTS -
?if @1 ne '' && @1 ne '-' ?if @1 ne '' && @1 ne '-'
?if @1 eq 'audit' ?if @1 eq 'audit'
?set tcpflags_action A_DROP ?set tcpflags_action 'A_DROP'
?else ?else
?error The parameter to TCPFlags must be 'audit' or '-' ?error The parameter to TCPFlags must be 'audit' or '-'
?endif ?endif
?else ?else
?set tcpflags_action DROP ?set tcpflags_action 'DROP'
?endif ?endif
$tcpflags_action - - ;;+ -p 6 --tcp-flags ALL FIN,URG,PSH $tcpflags_action - - ;;+ -p 6 --tcp-flags ALL FIN,URG,PSH